You copied the Doc URL to your clipboard.

__ror intrinsic

This intrinsic inserts a ROR instruction or operand rotation into the instruction stream generated by the compiler. It enables you to rotate a value right by a specified number of places from within your C or C++ code.


The compiler introduces ROR automatically when it recognizes certain expressions.


unsigned int __ror(unsigned int val, unsigned int shift)



is the value to be shifted right


is a constant shift in the range 1-31.

Return value

The __ror intrinsic returns the value of val rotated right by shift number of places.

See also