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 #146 background imageLoading...
Page #146 background image
IA-32 Intel® Architecture Optimization
2-74
Complex Instructions
Assembly/Compiler Coding Rule 40. (ML impact, M generality) Avoid
using complex instructions (for example, enter, leave, or loop) that have
more than four µops and require multiple cycles to decode. Use sequences of
simple instructions instead.
Complex instructions may save architectural registers, but incur a
penalty of 4 µops to set up parameters for the microcode ROM.
Use of the lea Instruction
In many cases, the lea instruction or a sequence of lea, add, sub and
shift instructions can replace constant multiply instructions. The lea
instruction can also be used as a multiple operand addition instruction,
for example:
lea ecx, [eax + ebx + 4 + a]
Using lea in this way may avoid register usage by not tying up registers
for operands of arithmetic instructions. This use may also save code
space.
If the
lea instruction uses a shift by a constant amount then the latency
of the sequence of µops is shorter if
adds are used instead of a shift, and
the
lea instruction may be replaced with an appropriate sequence of
µops. This, however, this increases the total number of µops, leading to
a trade-off.
Assembly/Compiler Coding Rule 41. (ML impact, M generality) If a lea
instruction using the scaled index is on the critical path, a sequence with
adds
may be better. If code density and bandwidth out of the trace cache are the
critical factor, then use the
lea instruction.

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