pub fn arithmetic_shift_right(val: u32, shift_amount: u32) -> ShiftResults
Expand description
Shifts bits right by an instruction 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 shift is interpreted as ASR#32 or arithmetic shift right by 32. The bits of the result val becomes all ones or zeros, according to bit 31 in val; either 0xFFFF_FFFF or 0x0 and the carry out is bit 31 of original val.