IBM PPC440X5 Computer Hardware User Manual


 
rlwimi
Rotate Left Word Immediate then Mask Insert
Preliminary PPC440x5 CPU Core User’s Manual
instrset.fm.
September 12, 2002 Page 399 of 589
rlwimi
Rotate Left Word Immediate then Mask Insert
r ROTL((RS), SH)
m
MASK(MB, ME)
(RA)
(r m) ((RA) ∧¬m)
The contents of register RS are rotated left by the number of bit positions specified in the SH field. A mask is
generated, having 1-bits starting at the bit position specified in the MB field and ending in the bit position
specified by the ME field, with 0-bits elsewhere.
If the starting point of the mask is at a higher bit position than the ending point, the 1-bits portion of the mask
wraps from the highest bit position back around to the lowest. The rotated data is inserted into register RA, in
positions corresponding to the bit positions in the mask that contain a 1-bit.
Registers Altered
•RA
CR[CR0] if Rc contains 1
rlwimi RA, RS, SH, MB, ME Rc=0
rlwimi. RA, RS, SH, MB, ME Rc=1
20 RS RA SH MB ME Rc
0 6 11 16 21 26 31
Table 9-26. Extended Mnemonics for rlwimi, rlwimi.
Mnemonic Operands Function
Other Registers
Altered
inslwi
RA, RS, n, b
Insert from left immediate (n > 0).
(RA)
b:b+n-1
(RS)
0:n-1
Extended mnemonic for
rlwimi RA,RS,32b,b,b+n1
inslwi.
Extended mnemonic for
rlwimi. RA,RS,32b,b,b+n1
CR[CR0]
insrwi
RA, RS, n, b
Insert from right immediate. (n > 0)
(RA)
b:b+n-1
(RS)
32-n:31
Extended mnemonic for
rlwimi RA,RS,32bn,b,b+n1
insrwi.
Extended mnemonic for
rlwimi. RA,RS,32bn,b,b+n1
CR[CR0]