ia-32_instruction-set-ref_a-m

Chart at the beginning of this section for encoding

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: unaligned memory reference is made. Compatibility Mode Exceptions Same exceptions as in Protected Mode. 64-Bit Mode Exceptions #SS(0) #GP(0) #PF(fault-code) #AC(0) If a memory address referencing the SS segment is in a noncanonical form. If the memory address is in a non-canonical form. If a page fault occurs. If alignment checking is enabled and an unaligned memory reference is made while the current privilege level is 3. 3-124 Vol. 2 INSTRUCTION SET REFERENCE, A-M CMPPD--Compare Packed Double-Precision Floating-Point Values Opcode 66 0F C2 /r ib Instruction CMPPD xmm1, xmm2/m128, imm8 64-Bit Mode Valid Compat/ Leg Mode Valid Description Compare packed doubleprecision floating-point values in xmm2/m128 and xmm1 using imm8 as comparison predicate. Description Performs a SIMD compare of the two packed double-precision floating-point values in the source operand (second operand) and the destination operand (first operand) and returns the results of the comparison to the destination operand. The comparison predicate operand (third operand) specifies the type of comparison performed on each of the pairs of packed values. The result of each comparison is a quadword mask of all 1s (comparison true) or all 0s (comparison false). The source operand can be an XMM register or a 128-bit memory location. The destination operand is an XMM register. The comparison predicate operand is an 8-bit immediate, the first 3 bits of which define the type of comparison to be made (see Table 3-7). Bits 4 through 7 of the immediate are reserved. Table 3-7. Comparison Predicate for CMPPD and CMPPS Instructions Predicate EQ LT LE imm8 Encoding 000B 001B 010B Relation where: A Is 1st Operand B Is 2nd Operand A=B A<B AB A>B Swap Operands, Use LT Swap Operands, Use LE Result if NaN Emulation Operand False False False False QNaN Oper-and Signals Invalid No Yes Yes Yes Description Equal Less-than Less-than-or-equal Greater than Greater-than-orequal UNORD NEQ NLT NLE 011B 100B 101B 110B Unordered Not-equal Not-less-than Not-less-than-orequal AB False Yes A, B = Unordered AB NOT(A < B) NOT(A B) True True True True No No Yes Yes Vol. 2 3-125 INSTRUCTION SET REFERENCE, A-M Table 3-7. Comparison Predicate for CMPPD and CMPPS Instructions (Contd.) Predicate imm8 Encoding Relation where: A Is 1st Operand B Is 2nd Operand NOT(A > B) Result if NaN Emulation Operand Swap Operands, Use NLT Swap Operands, Use NLE True QNaN Oper-and Signals Invalid Yes Description Not-greater-than Not-greater-thanor-equal ORD 111B Ordered NOT(A B) True Yes A , B = Ordered False No The unordered relationship is true when at least one of the two source operands being compared is a NaN; the ordered relationship is true when neither source operand is a NaN. A subsequent computational instruction that uses the mask result in the destination operand as an input operand will not generate an exception, because a mask of all 0s corresponds to a floating-point value of +0.0 and a mask of all 1s corresponds...
View Full Document

Ask a homework question - tutors are online