srw
Shift Right Word
PPC440x5 CPU Core User’s Manual Preliminary
Page 408 of 589 instrset.fm.
September 12, 2002
srw
Shift Right Word
n(RB)26:31
rROTL((RS), 32 – n)
if n < 32 then
mMASK(n, 31)
else
m320
(RA) r m
The contents of register RS are shifted right by the number of bits specified the contents of register RB26:31.
Bits shifted right out of the least significant bit are lost, and 0-bits fill the vacated bit positions on the left. The
result is placed into register RA.
Note that if RB26 = 1, then the shift amount is 32 bits or more, and thus all bits are shifted out such that
register RA is set to zero.
Registers Altered
•RA
CR[CR0] if Rc contains 1
srw RA, RS, RB Rc=0
srw. RA, RS, RB Rc=1
31 RS RA RB 536 Rc
0 6 11 16 21 31