MOVAPD
In the x86 assembly programming language, MOVAPD is the name for a specific action performable by modern x86 processors with 2nd-generation Streaming SIMD Extensions (SSE2). This action involves copying a pair of numbers to temporary space in the processor for use in other computations. MOVAPD is one of the fastest ways to accomplish this effect - it is faster than the comparable instruction MOVSD.
Specifically, MOVAPD causes a 16-byte-aligned packed-doubles source to be copied to an XMM register or a 16-byte memory region.
Usage
| Opcode | Assembly (Intel syntax) | Assembly (AT&T syntax) | icc intrinsic equivalent(s) | gcc built-in(s) |
|---|---|---|---|---|
66 0F 28 /r
|
MOVAPD xmm1, xmm2/m128
|
MOVAPD xmm2/m128, xmm1
|
__m128 _mm_load_pd(double* p)
|
|
66 0F 29 /r
|
MOVAPD xmm1/m128, xmm2
|
MOVAPD xmm2, xmm1/m128
|
void _mm_store_pd(double* p, __m128 a)
|
The source operand can be either an XMM register (xmm2) or a memory address (m128).
The destination operand can be either an XMM register (xmm1) or a memory address (m128). Note, however, that the source and destination operands cannot both be memory addresses.
Potential Exceptions
If a memory address operand is not 16-byte-aligned, a general protection exception (#GP) will be raised. This can cause strange interoperability bugs when ordinary code calls an external code that was compiled with the assumption of a 16-byte-aligned stack frame boundary.[1]
References
- gcc info documentation
- Intel 64 and IA-32 Architectures Optimization Reference Manual, November, 2006.
- Intel 64 and IA-32 Architectures Software Developer's Manual Volume 2A: Instruction Set Reference, A-M, November, 2006.
- ^ "The Hell that MOVAPS Hath Wrought | Mystery Bail Theater". 10 September 2007.
See also
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.