
3-14
G2 PowerPC Core Reference Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
Instruction Set Summary
3.2.4.1.4
Integer Rotate and Shift Instructions
Rotation operations are performed on data from a GPR, and the result, or a portion of the
result, is returned to a GPR. See Appendix F, “Simplified Mnemonics,” in the
Programming Environments Manual
, for a complete list of simplified mnemonics that
allows simpler coding of often-used functions such as clearing the leftmost or rightmost
bits of a register, left justifying or right justifying an arbitrary field, and simple rotates and
shifts.
Integer rotate instructions rotate the contents of a register. The result of the rotation is either
inserted into the target register under control of a mask (if a mask bit is 1, the associated bit
of the rotated data is placed into the target register; and if the mask bit is 0, the associated
bit in the target register is unchanged), or ANDed with a mask before being placed into the
target register.
The integer rotate instructions are listed in Table 3-6.
Table 3-5. Integer Logical Instructions
Name
Mnemonic
Operand Syntax
AND
and
(
and.
)
r
A
,r
S
,r
B
AND Immediate
andi.
r
A
,r
S
,
UIMM
AND Immediate Shifted
andis.
r
A
,r
S
,
UIMM
AND with Complement
andc
(
andc.
)
r
A
,r
S
,r
B
Count Leading Zeros Word
cntlzw
(
cntlzw.
)
r
A
,r
S
Equivalent
eqv
(
eqv.
)
r
A
,r
S
,r
B
Extend Sign Byte
extsb
(
extsb.
)
r
A
,r
S
Extend Sign Half Word
extsh
(
extsh.
)
r
A
,r
S
NAND
nand
(
nand.
)
r
A
,r
S
,r
B
NOR
nor
(
nor.
)
r
A
,r
S
,r
B
OR
or
(
or.
)
r
A
,r
S
,r
B
OR Immediate
ori
r
A
,r
S
,
UIMM
OR Immediate Shifted
oris
r
A
,r
S
,
UIMM
OR with Complement
orc
(
orc.
)
r
A
,r
S
,r
B
XOR
xor
(
xor.
)
r
A
,r
S
,r
B
XOR Immediate
xori
r
A
,r
S
,
UIMM
XOR Immediate Shifted
xoris
r
A
,r
S
,
UIMM
F
Freescale Semiconductor, Inc.
n
.