03.03.2013 Views

Intel® Architecture Instruction Set Extensions Programming Reference

Intel® Architecture Instruction Set Extensions Programming Reference

Intel® Architecture Instruction Set Extensions Programming Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

INSTRUCTION SET REFERENCE - FMA<br />

VFMADD231PD: Multiplies the two or four packed double-precision floating-point values from the second source to<br />

the two or four packed double-precision floating-point values in the third source operand, adds the infinite precision<br />

intermediate result to the two or four packed double-precision floating-point values in the first source<br />

operand, performs rounding and stores the resulting two or four packed double-precision floating-point values to<br />

the destination operand (first source operand).<br />

VEX.256 encoded version: The destination operand (also first source operand) is a YMM register and encoded in<br />

reg_field. The second source operand is a YMM register and encoded in VEX.vvvv. The third source operand is a<br />

YMM register or a 256-bit memory location and encoded in rm_field.<br />

VEX.128 encoded version: The destination operand (also first source operand) is a XMM register and encoded in<br />

reg_field. The second source operand is a XMM register and encoded in VEX.vvvv. The third source operand is a<br />

XMM register or a 128-bit memory location and encoded in rm_field. The upper 128 bits of the YMM destination<br />

register are zeroed.<br />

Compiler tools may optionally support a complementary mnemonic for each instruction mnemonic listed in the<br />

opcode/instruction column of the summary table. The behavior of the complementary mnemonic in situations<br />

involving NANs are governed by the definition of the instruction mnemonic defined in the opcode/instruction<br />

column. See also Section 2.3.1, “FMA <strong>Instruction</strong> Operand Order and Arithmetic Behavior”.<br />

Operation<br />

In the operations below, "+", "-", and "*" symbols represent addition, subtraction, and multiplication operations<br />

with infinite precision inputs and outputs (no rounding).<br />

VFMADD132PD DEST, SRC2, SRC3<br />

IF (VEX.128) THEN<br />

MAXVL =2<br />

ELSEIF (VEX.256)<br />

MAXVL = 4<br />

FI<br />

For i = 0 to MAXVL-1 {<br />

n = 64*i;<br />

DEST[n+63:n] RoundFPControl_MXCSR(DEST[n+63:n]*SRC3[n+63:n] + SRC2[n+63:n])<br />

}<br />

IF (VEX.128) THEN<br />

DEST[VLMAX-1:128] 0<br />

FI<br />

VFMADD213PD DEST, SRC2, SRC3<br />

IF (VEX.128) THEN<br />

MAXVL =2<br />

ELSEIF (VEX.256)<br />

MAXVL = 4<br />

FI<br />

For i = 0 to MAXVL-1 {<br />

n = 64*i;<br />

DEST[n+63:n] RoundFPControl_MXCSR(SRC2[n+63:n]*DEST[n+63:n] + SRC3[n+63:n])<br />

}<br />

IF (VEX.128) THEN<br />

DEST[VLMAX-1:128] 0<br />

FI<br />

VFMADD231PD DEST, SRC2, SRC3<br />

IF (VEX.128) THEN<br />

MAXVL =2<br />

ELSEIF (VEX.256)<br />

MAXVL = 4<br />

FI<br />

Ref. # 319433-014 6-3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!