EasyManuals Logo

Intel ARCHITECTURE IA-32 User Manual

Intel ARCHITECTURE IA-32
568 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #161 background imageLoading...
Page #161 background image
General Optimization Guidelines 2
2-89
Use movapd as an alternative; it writes all 128 bits. Even though this
instruction has a longer latency, the μops for
movapd use a different
execution port and this port is more likely to be free. The change can
impact performance. There may be exceptional cases where the latency
matters more than the dependence or the execution port.
Assembly/Compiler Coding Rule 54. (M impact, ML generality) Avoid
introducing dependences with partial floating point register writes, e.g. from
the movsd xmmreg1, xmmreg2 instruction. Use the movapd xmmreg1,
xmmreg2
instruction instead.
The movsd xmmreg, mem instruction writes all 128 bits and breaks a
dependence.
The
movupd from memory instruction performs two 64-bit loads, but
requires additional μops to adjust the address and combine the loads
into a single register. This same functionality can be obtained using
movsd xmmreg1, mem; movsd xmmreg2, mem+8; unpcklpd xmmreg1,
xmmreg2
, which uses fewer μops and can be packed into the trace cache
more effectively. The latter alternative has been found to provide several
percent of performance improvement in some cases. Its encoding
requires more instruction bytes, but this is seldom an issue for the
Pentium 4 processor. The store version of
movupd is complex and slow,
so much so that the sequence with two
movsd and a unpckhpd should
always be used.
Assembly/Compiler Coding Rule 55. (ML impact, L generality) Instead of
using movupd xmmreg1, mem for a unaligned 128-bit load, use movsd
xmmreg1, mem; movsd xmmreg2, mem+8;
unpcklpd xmmreg1,
xmmreg2
. If the additional register is not available, then use movsd
xmmreg1, mem; movhpd xmmreg1, mem+8.
Assembly/Compiler Coding Rule 56. (M impact, ML generality) Instead of
using
movupd mem, xmmreg1 for a store, use movsd mem, xmmreg1;
unpckhpd xmmreg1, xmmreg1; movsd mem+8, xmmreg1 instead.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Intel ARCHITECTURE IA-32 and is the answer not in the manual?

Intel ARCHITECTURE IA-32 Specifications

General IconGeneral
Instruction Setx86
Instruction Set TypeCISC
Memory SegmentationSupported
Operating ModesReal mode, Protected mode, Virtual 8086 mode
Max Physical Address Size36 bits (with PAE)
Max Virtual Address Size32 bits
ArchitectureIA-32 (Intel Architecture 32-bit)
Addressable Memory4 GB (with Physical Address Extension up to 64 GB)
Floating Point Registers8 x 80-bit
MMX Registers8 x 64-bit
SSE Registers8 x 128-bit
RegistersGeneral-purpose registers (EAX, EBX, ECX, EDX, ESI, EDI, ESP, EBP), Segment registers (CS, DS, SS, ES, FS, GS), Instruction pointer (EIP), Flags register (EFLAGS)
Floating Point UnitYes (x87)

Related product manuals