pub fn arithmetic_shift_right(
    val: u32,
    shift_amount: u32,
    carry_flag: bool
) -> ShiftResults
Expand description

Shifts bits right by a register specified amount while preserving the sign of the val.

Bits are moved out of the right-hand end and bit 31 of the val are filled in the left-hand end to preserves the sign in 2’s complement notation. If the shift amount is zero, the carry-out is the old carry flag and val is untouched. If the shift amount is greater than zero and less than 32, the shift functions identically as instruction_specified_shift::arithmetic_shift_right. If the shift amount is greater than 32, the carry-out is bit 32 of the original val the result val is filled with the carry out; either 0xFFFF_FFFF or 0x0.