29.12.2014 Views

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Compiler</strong>-specific Features<br />

Inline optimization<br />

If a function foo is inlined into a function bar then the value returned by<br />

__return_address from within foo is the return address of bar.<br />

Tail-call optimization<br />

If a function foo is tail-called from a function bar then the value returned<br />

by __return_address from within foo is the return address of bar.<br />

See also<br />

• __builtin_return_address on page 4-67<br />

• __current_pc on page 4-70<br />

• __current_sp on page 4-70<br />

• Legacy inline assembler that accesses sp, lr, or pc on page 6-27 in the <strong>Compiler</strong><br />

User <strong>Guide</strong>.<br />

4.7.32 __ror<br />

This intrinsic inserts a ROR instruction or operand rotation into the instruction stream<br />

generated by the compiler. It enables you to rotate a value right by a specified number<br />

of places from within your C or C++ code.<br />

Note<br />

The compiler introduces ROR automatically when it recognizes certain expressions.<br />

Syntax<br />

unsigned int __ror(unsigned int val, unsigned int shift)<br />

Where:<br />

val is the value to be shifted right<br />

shift is a constant shift in the range 1-31.<br />

Return value<br />

The __ror intrinsic returns the value of val rotated right by shift number of places.<br />

See also<br />

• ASR, LSL, LSR, ROR, and RRX on page 4-66 in the Assembler <strong>Guide</strong>.<br />

4-84 Copyright © 2007, 2010 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DUI 0348A<br />

Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!