Function eikon3ds_core::arch::register_specified_shift::rotate_right
source · pub fn rotate_right(
val: u32,
shift_amount: u32,
carry_flag: bool
) -> ShiftResultsExpand description
Rotates bits right by a register specified amount.
Bits moved out of the right-hand end are rotated back into the left-hand
end. If the shift amount is specified is zero, the carry-out is the old
carry flag and val is untouched. Otherwise, the shift amount is repeatedly
subtracted by 32 until its in the range of 1..=32. Once the shift amount is
in range, if the shift amount is zero, this means the original shift amount
was outside the range of an integer so the val is untouched and the carry
out is bit 31 of val. If the shift amount is greater than zero, the shift
functions identically as instruction_specified_shift::rotate_right using
the newly in range shift amount.