04.01.2015 Views

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

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.

Compiler-specific Features<br />

4.7.26 __rbit<br />

This intrinsic inserts an RBIT instruction into the instruction stream generated by the<br />

compiler. It enables you to reverse the bit order in a 32-bit word from within your C or<br />

C++ code.<br />

Syntax<br />

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

where:<br />

val<br />

is the data value whose bit order is to be reversed.<br />

Return value<br />

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

See also<br />

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

4.7.27 __rev<br />

This intrinsic inserts a REV instruction or an equivalent code sequence into the<br />

instruction stream generated by the compiler. It enables you to convert a 32-bit<br />

big-endian data value into a little-endian data value, or a 32-bit little-endian data value<br />

into big-endian data value from within your C or C++ code.<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 />

4-94 Copyright © 2007-2010 <strong>ARM</strong>. All rights reserved. <strong>ARM</strong> DUI 0348C<br />

Non-Confidential,<br />

ID101213

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

Saved successfully!

Ooh no, something went wrong!