Skip to main content

rotate_right

Function rotate_right 

Source
pub const fn rotate_right(value: u32, shift: u32) -> u32
Expand description

ROR by a fixed 1-31 amount with no carry-out tracking (Mesen2’s 2-argument RotateRight).

Used by MSR’s immediate-operand rotate. shift must be 1..=31; the immediate encodings that call this always derive it as (nibble) * 2 from a nonzero nibble, so it’s never 0.