Next: Divide Up: Instructions Previous: Compare Halfword

Compare Logical

The first operand is compared with the second operand, and the result is indicated in the condition code.

The comparison is performed with the operands considered as binary unsigned quantities, with all codes valid. The operation proceeds left to right and ends as soon as an inequality is found or an end of the fields is reached.

When part of an operand in CL or CLC is designated in an inaccessible location but the operation can be completed by using the accessible operand parts, it is unpredictable whether the access exception for the inaccessible part is recognized.

Resulting Condition Code:
0 ~ Operands are equal
1 ~ First operand is low
2 ~ First operand is high
3 ~ -

Program Exceptions:
Access (fetch, operand 2, CL and CLC; fetch, operand 1, CLI and CLC)

Programming Note
The COMPARE LOGICAL instruction treats all bits alike as part of an unsigned binary quantity.

The immediate byte's position in the operand is reversed. Given a word-aligned address D, bytes will be accessed as follows:

Address  Bits 
D        D(31:24) 
D+1      D(23:16) 
D+2      D(15:8) 
D+3      D(7:0)

See Extended Mnemonic Instructions on page

Next: Divide Up: Instructions Previous: Compare Halfword