Motorola MPC823e Reference Manual page 1274

Microprocessor for mobile computing
Table of Contents

Advertisement

MPC823e Instruction Set—rlwimi
rlwimi
Assembler Syntax
BIT
0
1
2
FIELD
20
BIT
16
17
18
FIELD
SH
Definition
Operation
Description
B-116
rlwimi
rA,rS,SH,MB,ME (Rc = 0)
rlwimi.
rA,rS,SH,MB,ME (Rc = 1)
3
4
5
6
7
19
20
21
22
23
MB
Rotate Left Word Immediate then Mask Insert
← SH
n
r ← ROTL(rS,
)
n
m ← MASK(MB, ME)
rA ← (r & m) | (rA & ¬ m)
The contents of rS are rotated left the number of bits specified
by operand SH. A mask is generated having 1 bits from bit MB
through bit ME and 0 bits elsewhere. The rotated data is inserted
into rA under control of the generated mask.
Note that rlwimi can be used to insert a bit field into the contents
of rA using the methods shown below:
To insert an n-bit field, that is left-justified rS, into rA
starting at bit position b, set SH = 32 – b, MB = b, and
ME = (b + n) – 1.
To insert an n-bit field, that is right-justified in rS, into rA
starting at bit position b, set SH = 32 – (b + n), MB = b,
and ME = (b + n) – 1.
Other registers altered:
Condition Register (CR0 field):
Affected: LT, GT, EQ, SO(if Rc = 1)
MPC823e REFERENCE MANUAL
8
9
10
11
12
S
24
25
26
27
28
ME
13
14
15
A
29
30
31
RC
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents