Software Optimization Guide for AMD64 Processors

25112 Rev. 3.06 September 2005

9.3Use MOVLPx/MOVHPx Instructions for Unaligned Data Access

Optimization

When data alignment cannot be guaranteed, use MOVLPD/MOVHPD, MOVLPS/MOVHPS or MOVLPD/MOVHPD pairs in lieu of MOVUPD, MOVUPS or MOVDQU, respectively.

Application

This optimization applies to:

32-bit software

64-bit software

Rationale

The MOVUPS, MOVUPD and MOVDQU instructions are VectorPath when one of the operands is a memory location. It is better to use one of the MOVLPx/MOVHPx or MOVQ/MOVHPD pairs. It is prefereable to load or store the 64-bit halves of an XMM register separately when the memory location cannot be guaranteed to be aligned.

198

Optimizing with SIMD Instructions

Chapter 9

Page 214
Image 214
AMD 250 manual Use MOVLPx/MOVHPx Instructions for Unaligned Data Access, 198