4.7.30.  __rev

This intrinsic inserts a REV instruction or an equivalent code sequence into the instruction stream generated by the compiler. It enables you to convert a 32-bit big-endian data value into a little-endian data value, or a 32-bit little-endian data value into big-endian data value from within your C or C++ code.


The compiler introduces REV automatically when it recognizes certain expressions.


unsigned int __rev(unsigned int val)



is an unsigned int.

Return value

The __rev intrinsic returns the value obtained from val by reversing its byte order.

See also

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A