Download IBM PPC403GCX Embedded Controller User`s Manual

Transcript
rlwimi
1
Rotate Left Word Immediate then Mask Insert
rlwimi
Rotate Left Word Immediate then Mask Insert
rlwimi
rlwimi.
RA,RS,SH,MB,ME
RA,RS,SH,MB,ME
20
RS
0
6
2
(Rc=0)
(Rc=1)
RA
11
SH
16
MB
ME
21
26
Rc
3
31
r ← ROTL((RS), SH)
m ← MASK(MB, ME)
(RA) ← (r ∧ m) ∨ ((RA) ∧ ¬m)
4
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
5
6
7
8
• RA
• CR[CR0]LT, GT, EQ, SO if Rc contains 1
9
Architecture Note
This instruction is part of the PowerPC User Instruction Set Architecture.
10
Table 11-25. Extended Mnemonics for rlwimi, rlwimi.
Mnemonic
inslwi
Operands
RA, RS, n, b
Function
Extended mnemonic for
rlwimi. RA,RS,32−b,b,b+n−1
RA, RS, n, b
12
Insert from left immediate. (n > 0)
(RA)b:b+n−1 ← (RS)0:n−1
Extended mnemonic for
rlwimi RA,RS,32−b,b,b+n−1
inslwi.
insrwi
11
Other
Registers
Changed
13
CR[CR0]
A
Insert from right immediate. (n > 0)
(RA)b:b+n−1 ← (RS)32−n:31
Extended mnemonic for
rlwimi RA,RS,32−b−n,b,b+n−1
Extended mnemonic for
rlwimi. RA,RS,32−b−n,b,b+n−1
insrwi.
B
CR[CR0]
C
Ver 0.04, 5/07/97
Preliminary
Instruction Set
11-129
I