Integer Rotate And Shift Instructions - IBM PowerPC 604 User Manual

Risc
Table of Contents

Advertisement

Table 2·11. Integer Loglcal Instructions (Continued)
Name
Mnemonic
Operand
Syntax
XOR
xor (xor.)
rA,rS,rB
NANO
nand (nand.)
rA,rS,rB
NOR
nor (nor.)
rA,rS,rB
Equivalent
eqv (eqv.)
rA,rS,rB
AND
with
Complement
andc (andc.)
rA,rS,rB
OR with Complement
ore
(ore.)
rA,rS,rB
Extend Sign Byte
extsb (extsb.)
rA,rS
Extend Sign HaH Word
extsh (extsh.)
rA,rS
Count
Leading
Zeros Word
cntlzw (cntlZw.)
rA,rS
2.3.4.1.4 Integer Rotate and Shift Instructions
Rotation operations are performed on data from a OPR, and the result, or a portion of the
result, is returned to a OPR. 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 summarized in Table 2-12.
Table 2·12. Integer Rotate Instructions
Name
Mnemonic
Operand
Syntax
Rotate
Left
Word Immediate then AND with Mask
rtwlnm (rtwlnm.)
rA,rS,SH,MB,ME
Rotate
Left
Word then AND with Mask
rlwnm (rlwnm.)
rA,rS,rB,MB,ME
Rotate
Left
Word Immediate then Mask Insert
rtwlml (rlwlml.)
rA,rS,SH,MB,ME
The integer shift instructions perform left and right shifts. Immediate-form logical
(unsigned) shift operations are obtained by specifying masks and shift values for certain
rotate instructions. Simplified mnemonics (shown in Appendix F, "Simplified
Mnemonics," in
The Programming Environments Manual)
are provided to make coding of
such shifts simpler and easier to understand.
Chapter 2. PowerPC 604 Processor Programming Model
2-29
-

Advertisement

Table of Contents
loading

Table of Contents