A.2.3 SSE Condition Predicates
The condition predicates for SSE comparison instructions are the codes
used as part of the opcode, to determine what form of comparison is
being carried out. In each case, the imm8 value is the final byte of
the opcode encoding, and the predicate is the code used as part of the
mnemonic for the instruction (equivalent to the "cc" in an integer
instruction that used a condition code). The instructions that use this
will give details of what the various mnemonics are, this table is used
to help you work out details of what is happening.
Predi- imm8 Description Relation where: Emula- Result QNaN
cate Encod- A Is 1st Operand tion if NaN Signal
ing B Is 2nd Operand Operand Invalid
EQ 000B equal A = B False No
LT 001B less-than A < B False Yes
LE 010B less-than- A <= B False Yes
or-equal
--- ---- greater A > B Swap False Yes
than Operands,
Use LT
--- ---- greater- A >= B Swap False Yes
than-or-equal Operands,
Use LE
UNORD 011B unordered A, B = Unordered True No
NEQ 100B not-equal A != B True No
NLT 101B not-less- NOT(A < B) True Yes
than
NLE 110B not-less- NOT(A <= B) True Yes
than-or-
equal
--- ---- not-greater NOT(A > B) Swap True Yes
than Operands,
Use NLT
--- ---- not-greater NOT(A >= B) Swap True Yes
than- Operands,
or-equal Use NLE
ORD 111B ordered A , B = Ordered False No
The unordered relationship is true when at least one of the two values
being compared is a NaN or in an unsupported format.
Note that the comparisons which are listed as not having a predicate or
encoding can only be achieved through software emulation, as described
in the "emulation" column. Note in particular that an instruction such
as "greater-than" is not the same as "NLE", as, unlike with the CMP
instruction, it has to take into account the possibility of one operand
containing a NaN or an unsupported numeric format.