Arithmetic shift of 32-bit value by a specified shift amount. If the shift count is positive, a right shift is performed. Otherwise, a left shift is performed. If a right shift is performed, then rounding performed on result. Saturation may occur during a left shift.
OMR's SA bit was set to 1 at least three cycles before this code, that is, saturation on data ALU results enabled.
Word32 L_shr_r(Word32 lval2shft, Word16 s_shftamount)
long l1 = 0x41111111; short s2 = 1; long result; result = L_shr_r(l1,s2); // Expected value of result: 0x20888889