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<br />

(V)ADDSD ADD Scalar Double — Precision Floating-Point Values (THIS IS AN EXAMPLE)<br />

Opcode/<br />

<strong>Instruction</strong><br />

Op/<br />

En<br />

64/32bit<br />

Mode<br />

CPUID<br />

Feature<br />

Flag<br />

Description<br />

F2 0F 58 /r A V/V SSE2 Add the low double-precision floating-point value from<br />

xmm2/mem to xmm1 and store the result in xmm1.<br />

ADDSD xmm1, xmm2/m64<br />

VEX.NDS.128.F2.0F.WIG 58 /r B V/V AVX Add the low double-precision floating-point value from<br />

xmm3/mem to xmm2 and store the result in xmm1.<br />

VADDSD xmm1, xmm2,<br />

xmm3/m64<br />

<strong>Instruction</strong> Operand Encoding<br />

Op/En Operand 1 Operand 2 Operand 3 Operand 4<br />

A ModRM:reg (w) ModRM:r/m (r) NA NA<br />

B ModRM:reg (w) VEX.vvvv (r) ModRM:r/m (r) NA<br />

5.1.2 Opcode Column in the <strong>Instruction</strong> Summary Table<br />

For notation and conventions applicable to instructions that do not use VEX prefix, consult Section 3.1 of the Intel<br />

64 and IA-32 <strong>Architecture</strong>s Software Developer’s Manual Volume 2A.<br />

In the <strong>Instruction</strong> Summary Table, the Opcode column presents each instruction encoded using the VEX prefix in<br />

following form (including the modR/M byte if applicable, the immediate byte if applicable):<br />

VEX.[NDS,NDD,DDS].[128,256,LZ,LIG].[66,F2,F3].0F/0F3A/0F38.[W0,W1, WIG] opcode [/r]<br />

[/ib,/is4]<br />

• VEX: indicates the presence of the VEX prefix is required. The VEX prefix can be encoded using the three-byte<br />

form (the first byte is C4H), or using the two-byte form (the first byte is C5H). The two-byte form of VEX only<br />

applies to those instructions that do not require the following fields to be encoded: VEX.mmmmm, VEX.W,<br />

VEX.X, VEX.B. Refer to Section 4.1.4 for more detail on the VEX prefix<br />

The encoding of various sub-fields of the VEX prefix is described using the following notations:<br />

— NDS, NDD, DDS: specifies that VEX.vvvv field is valid for the encoding of a register operand:<br />

• VEX.NDS: VEX.vvvv encodes the first source register in an instruction syntax where the content of<br />

source registers will be preserved.<br />

• VEX.NDD: VEX.vvvv encodes the destination register that cannot be encoded by ModR/M:reg field.<br />

• VEX.DDS: VEX.vvvv encodes the second source register in a three-operand instruction syntax where<br />

the content of first source register will be overwritten by the result.<br />

• If none of NDS, NDD, and DDS is present, VEX.vvvv must be 1111b (i.e. VEX.vvvv does not encode an<br />

operand). The VEX.vvvv field can be encoded using either the 2-byte or 3-byte form of the VEX prefix.<br />

— 128,256,LZ,LIG: VEX.L field can be 0 (denoted by VEX.128 or VEX.LZ) or 1 (denoted by VEX.256). The<br />

VEX.L field can be encoded using either the 2-byte or 3-byte form of the VEX prefix. The presence of the<br />

notation VEX.256 or VEX.128 in the opcode column should be interpreted as follows:<br />

• If VEX.256 is present in the opcode column: The semantics of the instruction must be encoded with<br />

VEX.L = 1. An attempt to encode this instruction with VEX.L= 0 can result in one of two situations: (a)<br />

if VEX.128 version is defined, the processor will behave according to the defined VEX.128 behavior; (b)<br />

an #UD occurs if there is no VEX.128 version defined.<br />

• If VEX.128 is present in the opcode column but there is no VEX.256 version defined for the same opcode<br />

byte: Two situations apply: (a) For VEX-encoded, 128-bit SIMD integer instructions, software must<br />

encode the instruction with VEX.L = 0. The processor will treat the opcode byte encoded with VEX.L= 1<br />

by causing an #UD exception; (b) For VEX-encoded, 128-bit packed floating-point instructions,<br />

5-2 Ref. # 319433-014

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

Saved successfully!

Ooh no, something went wrong!