[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Assembler Language Reference

cmpli (Compare Logical Immediate) Instruction

Purpose

Compares the contents of a general-purpose register and a given value logically.

Syntax

cmpli BF,L,RA,UI

See "Extended Mnemonics of Fixed-Point Compare Instructions" for more information.

Description

The cmpli instruction compares the contents of general-purpose register (GPR) RA with the concatenation of x`0000' and a 16-bit unsigned integer, UI, as unsigned integers and sets one of the bits in the Condition Register Field BF.

BF can be Condition Register Field 0-7; programmers can specify which Condition Register Field will indicate the result of the operation.

The bits of Condition Register Field BF are interpreted as follows:

Bit Name Description
0 LT (RA) < SI
1 GT (RA) > SI
2 EQ (RA) = SI
3 SO SO,OV

The cmpli instruction has one syntax form and does not affect the Fixed-Point Exception Register. Condition Register Field 0 is unaffected unless it is specified as BF by the programmer.

Parameters

BF Specifies Condition Register Field 0-7 that indicates result of compare.
L Must be set to 0 for the 32-bit subset architecture.
RA Specifies source general-purpose register for operation.
UI Specifies 16-bit unsigned integer for operation.

Examples

The following code compares the contents of GPR 4 and the unsigned integer 0xff and sets Condition Register Field 0 to reflect the result of the operation:

# Assume GPR 4 contains 0x0000 00ff.
cmpli 0,4,0xff
# The EQ bit of Condition Register Field 0 is set. 

Related Information

The cmp (Compare) instruction, cmpi (Compare Immediate) instruction, cmpl (Compare Logical) instruction.

Fixed-Point Processor.


[ Previous | Next | Contents | Home | Search ]