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 a big-endian data value from within your C or C++
code.
Note
The __rev intrinsic is available irrespective
of the target processor or architecture you are compiling for. However,
if the REV instruction is not available on the target,
the compiler compensates with an alternative code sequence that
could increase the number of instructions, effectively expanding
the intrinsic into a function.
Note
The compiler introduces REV automatically when
it recognizes certain expressions.
Syntax
unsigned int __rev(unsigned int val)
where:
val
is an unsignedint.
Return value
The __rev intrinsic returns the value
obtained from val by reversing its byte order.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.