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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

Note<br />

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

Syntax<br />

unsigned int __rev(unsigned int val)<br />

Where:<br />

val<br />

is an unsigned int.<br />

Return value<br />

The __rev intrinsic returns the value obtained from val by reversing its byte order.<br />

See also<br />

• REV, REV16, REVSH, and RBIT on page 4-64 in the Assembler <strong>Guide</strong>.<br />

4.7.31 __return_address<br />

This intrinsic returns the return address of the current function.<br />

Syntax<br />

unsigned int __return_address(void)<br />

Return value<br />

The __return_address intrinsic returns the value of the link register that is used in<br />

returning from the current function.<br />

Restrictions<br />

The __return_address intrinsic does not affect the ability of the compiler to perform<br />

optimizations such as inlining, tail-calling, and code sharing. Where optimizations are<br />

made, the value returned by __return_address reflects the optimizations performed:<br />

No optimization<br />

When no optimizations are performed, the value returned by<br />

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

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!