4.10.8 IEEE Floating Compare
Format:
CMPTyy | Fa.rx,Fb.rx,Fc.wq |
Operation:
IF Fav SIGNED_RELATION Fbv THEN
Fc ← 4000 0000 0000 000016
ELSE
Fc ← 0000 0000 0000 000016
Exceptions:
Invalid Operation
Instruction mnemonics:
CMPTEQ | Compare T_floating Equal |
CMPTLE | Compare T_floating Less Than or Equal |
CMPTLT | Compare T_floating Less Than |
CMPTUN | Compare T_floating Unordered |
Qualifiers:
Trapping: | Exception Completion (/SU) |
Description:
The two operands in Fa and Fb are compared. If the relationship specified by the qualifier is true, a
Comparisons are exact and never overflow or underflow. Four mutually exclusive relations are possible: less than, equal, greater than, and unordered. The unordered relation is true if one or both operands are NaN. (This behavior must be provided by an operating system (OS) comple- tion handler, since NaNs trap.) Comparisons ignore the sign of zero, so +0 =
Comparisons with plus and minus infinity execute normally and do not take an invalid operation trap.
Notes:
•In order to use CMPTxx with exception completion handling, it is necessary to specify the /SU IEEE trap mode, even though an underflow trap is not possible.
•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
Instruction Descriptions