Compaq ECQD2KCTE manual Logical and Shift Instructions

Models: ECQD2KCTE

1 371
Download 371 pages 20.35 Kb
Page 97
Image 97

4.5 Logical and Shift Instructions

The logical instructions perform quadword Boolean operations. The conditional move integer instructions perform conditionals without a branch. The shift instructions perform left and right logical shift and right arithmetic shift. These are summarized in Table 4–6.

Table 4–6: Logical and Shift Instructions Summary

Mnemonic

Operation

 

 

AND

Logical Product

BIC

Logical Product with Complement

BIS

Logical Sum (OR)

EQV

Logical Equivalence (XORNOT)

ORNOT

Logical Sum with Complement

XOR

Logical Difference

CMOVxx

Conditional Move Integer

SLL

Shift Left Logical

SRA

Shift Right Arithmetic

SRL

Shift Right Logical

 

 

Software Note:

There is no arithmetic left shift instruction. Where an arithmetic left shift would be used, a logical shift will do. For multiplying by a small power of two in address computations, logical left shift is acceptable.

Integer multiply should be used to perform an arithmetic left shift with overflow checking.

Bit field extracts can be done with two logical shifts. Sign extension can be done with a left logical shift and a right arithmetic shift.

Instruction Descriptions 4–41

Page 97
Image 97
Compaq ECQD2KCTE manual Logical and Shift Instructions Summary Mnemonic Operation