Intel 64 and IA-32 Architectures Software Developers Manual Volume 2A, Instruction Set Reference, A-M

3-604 Vol. 2
INSTRUCTION SET REFERENCE, A-M
MOVAPS—Move Aligned Packed Single-Precision Floating-Point Values
Description
Moves a double quadword containing four packed single-precision floating-point
values from the source operand (second operand) to the destination operand (first
operand). This instruction can be used to load an XMM register from a 128-bit
memory location, to store the contents of an XMM register into a 128-bit memory
location, or to move data between two XMM registers. When the source or destina-
tion operand is a memory operand, the operand must be aligned on a 16-byte
boundary or a general-protection exception (#GP) is generated.
To move packed single-precision floating-point values to or from unaligned memory
locations, use the MOVUPS instruction.
In 64-bit mode, use of the REX.R prefix permits this instruction to access additional
registers (XMM8-XMM15).
Operation
DEST SRC;
(* #GP if SRC or DEST unaligned memory operand *)
Intel C/C++ Compiler Intrinsic Equivalent
__m128 _mm_load_ps (float * p)
void_mm_store_ps (float *p, __m128 a)
SIMD Floating-Point Exceptions
None.
Protected Mode Exceptions
#GP(0) For an illegal memory operand effective address in the CS, DS,
ES, FS or GS segments.
If a memory operand is not aligned on a 16-byte boundary,
regardless of segment.
Opcode Instruction
64-Bit
Mode
Compat/
Leg Mode Description
0F 28 /r MOVAPS xmm1,
xmm2/m128
Valid Valid Move packed single-precision
floating-point values from
xmm2/m128 to xmm1.
0F 29 /r MOVAPS
xmm2/m128, xmm1
Valid Valid Move packed single-precision
floating-point values from xmm1
to xmm2/m128.