Shift And Rotate Instructions - Motorola MC68030 User Manual

Enhanced 32-bit microprocessor
Hide thumbs Also See for MC68030:
Table of Contents

Advertisement

Instruction
Operand Syntax
〈ea〉,Dn
AND
Dn,〈ea〉
ANDI
#〈data〉,〈ea〉
EOR
Dn,〈data〉,〈ea〉
EORI
#〈data〉,〈ea〉
NOT
〈ea〉,Dn
OR
Dn,〈ea〉
ORI
#〈data〉,〈ea〉
TST
#〈ea〉

3.2.4 Shift and Rotate Instructions

The arithmetic shift instructions (ASR and ASL) and logical shift instructions (LSR and LSL)
provide shift operations in both directions. The ROR, ROL, ROXR, and ROXL instructions
perform rotate (circular shift) operations, with and without the extend bit. All shift and rotate
operations can be performed on either registers or memory.
Register shift and rotate operations shift all operand sizes. The shift count may be specified
in the instruction operation word (to shift from 1–8 places) or in a register (modulo 64 shift
count).
Memory shift and rotate operations shift word-length operands one bit position only. The
SWAP instruction exchanges the 16-bit halves of a register. Performance of shift/rotate
instructions is enhanced so that use of the ROR and ROL instructions with a shift count of
eight allows fast byte swapping. Table 3–4 is a summary of the shift and rotate operations.
MOTOROLA
Table 3-3. Logical Operations
Operand Size
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
〈ea〉
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
8, 16, 32
MC68030 USER'S MANUAL
Operation
source Λ destination → destination
immediate data Λ destination → destination
source ⊕ destination → destination
immediate data x destination → destination
∼ destination → destination
source V destination → destination
immediate data V destination → destination
source — 0 to set condition codes
Instruction Set Summary
3-7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents