4.10.7 VAX Floating Compare

Format:

CMPGyy

Fa.rg,Fb.rg,Fc.wq

!Floating-point Operate format

Operation:

IF Fav SIGNED_RELATION Fbv THEN

Fc 4000 0000 0000 000016

ELSE

Fc 0000 0000 0000 000016

Exceptions:

Invalid Operation

Instruction mnemonics:

CMPGEQ

Compare G_floating Equal

CMPGLE

Compare G_floating Less Than or Equal

CMPGLT

Compare G_floating Less Than

Qualifiers:

Trapping:

Exception Completion (/S)

Description:

The two operands in Fa and Fb are compared. If the relationship specified by the qualifier is true, a non-zero floating value (0.5) is written to register Fc; otherwise, a true zero is written to Fc.

Comparisons are exact and never overflow or underflow. Three mutually exclusive relations are possible: less than, equal, and greater than.

An invalid operation trap is signaled if either operand has exp=0 and is not a true zero (that is, VAX reserved operands and dirty zeros trap). The contents of Fc are UNPREDICTABLE if this occurs.

Notes:

Compare Less Than A,B is the same as Compare Greater Than B,A; Compare Less Than or Equal A,B is the same as Compare Greater Than or Equal B,A. Therefore, only the less-than operations are included.

4–112Alpha Architecture Handbook

Page 168
Image 168
Compaq ECQD2KCTE manual VAX Floating Compare, Cmpgeq, Cmpgle, Cmpglt