Hardware manual

Rev. 3.0, 09/98, page 33 of 361
2.5.3 Logic Operations
Table 2.6 describes the four instructions that perform logic operations. See figure 2.6 in section
2.5.4, “Shift Operations,” for their object codes.
Table 2.6 Logic Operation Instructions
Instruction Size
*
Function
AND BRd Rs Rd, Rd #imm Rd
Performs a logical AND operation on a general register and another
general register or immediate data.
OR BRd Rs Rd, Rd #imm Rd
Performs a logical OR operation on a general register and another
general register or immediate data.
XOR BRd Rs Rd, Rd #imm Rd
Performs a logical exclusive OR operation on a general register and
another general register or immediate data.
NOT B ¬ (Rd) (Rd)
Obtains the one’s complement (logical complement) of general register
contents.
Note: Size: operand size
B: Byte
2.5.4 Shift Operations
Table 2.7 describes the eight shift instructions. Figure 2.6 shows the object code formats of the
arithmetic, logic, and shift instructions.
Table 2.7 Shift Instructions
Instruction Size
*
Function
SHAL
SHAR
B Rd shift Rd
Performs an arithmetic shift operation on general register contents.
SHLL
SHLR
B Rd shift Rd
Performs a logical shift operation on general register contents.
ROTL
ROTR
B Rd rotate Rd
Rotates general register contents.
ROTXL
ROTXR
B Rd rotate through carry Rd
Rotates general register contents through the C (carry) bit.
Note: Size: operand size
B: Byte