Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 4 REV 2.3 Manual page 497

Hide thumbs Also See for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 4 REV 2.3:
Table of Contents

Advertisement

CMPPS: Packed Single-FP Compare
Opcode
0F,C2,/r,ib
Operation:
switch (imm8) {
case eq:
case lt:
case le:
case unord:
case neq:
case nlt:
case nle:
case ord:
default:
}
cmp0 = op(xmm1[31-0],xmm2/m128[31-0]);
cmp1 = op(xmm1[63-32],xmm2/m128[63-32]);
cmp2 = op(xmm1[95-64],xmm2/m128[95-64]);
cmp3 = op(xmm1[127-96],xmm2/m128[127-96]);
xmm1[31-0]
xmm1[63-32]
xmm1[95-64]
xmm1[127-96]
For each individual pairs of SP FP numbers, the CMPPS instruction returns an all "1"
Description:
32-bit mask or an all "0" 32-bit mask, using the comparison predicate specified by
imm8; note that a subsequent computational instruction which uses this mask as an
input operand will not generate a fault, since a mask of all "0's" corresponds to a FP
value of +0.0 and a mask of all "1's" corresponds to a FP value of -qNaN. Some of the
comparisons can be achieved only through software emulation. For these comparisons
the programmer must swap the operands, copying registers when necessary to protect
the data that will now be in the destination, and then perform the compare using a
different predicate. The predicate to be used for these emulations is listed in under the
heading "Emulation." The following table shows the different comparison types:
4:490
Instruction
CMPPS xmm1, xmm2/m128,
imm8
op = eq;
op = lt;
op = le;
op = unord;
op = neq;
op = nlt;
op = nle;
op = ord;
Reserved;
= (cmp0) ? 0xffffffff : 0x00000000;
= (cmp1) ? 0xffffffff : 0x00000000;
= (cmp2) ? 0xffffffff : 0x00000000;
= (cmp3) ? 0xffffffff : 0x00000000;
Description
Compare packed SP FP numbers from XMM2/Mem to
packed SP FP numbers in XMM1 register using imm8 as
predicate.
Volume 4: IA-32 SSE Instruction Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture

Table of Contents