
Fetch and Decode Pipeline Stages
143
22007E/0—November 1999
AMD Athlon™ Processor x86 Code Optimization
Cycle 1–FETCH
The FETCH pipeline stage calculates the address of the next
x86 instruction window to fetch from the processor caches or
system memory.
Cycle 2–SCAN
SCAN determines the start and end pointers of instructions.
SCAN can send up to six aligned instructions (DirectPath and
VectorPath) to ALIGN1 and only one VectorPath instruction to
the microcode engine (MENG) per cycle.
Cycle 3 (DirectPath)–
ALIGN1
Because each 8-byte buffer (quadword queue) can contain up to
three instructions, ALIGN1 can buffer up to a maximum of nine
instructions, or 24 instruction bytes. ALIGN1 tries to send three
instructions from an 8-byte buffer to ALIGN2 per cycle.
Cycle 3 (VectorPath)–
MECTL
For VectorPath instructions, the microcode engine control
(MECTL) stage of the pipeline generates the microcode entry
points.
Cycle 4 (DirectPath)–
ALIGN2
ALIGN2 prioritizes prefix bytes, determines the opcode,
ModR/M, and SIB bytes for each instruction and sends the
accumulated prefix information to EDEC.
Cycle 4 (VectorPath)–
MEROM
In the microcode engine ROM (MEROM) pipeline stage, the
entry-point generated in the previous cycle, MECTL, is used to
index into the MROM to obtain the microcode lines necessary
to decode the instruction sent by SCAN.
Cycle 5 (DirectPath)–
EDEC
The early decode (EDEC) stage decodes information from the
DirectPath stage (ALIGN2) and VectorPath stage (MEROM)
into MacroOPs. In addition, EDEC determines register
pointers, flag updates, immediate values, displacements, and
other information. EDEC then selects either MacroOPs from
the DirectPath or MacroOPs from the VectorPath to send to the
instruction decoder (IDEC) stage.
Cycle 5 (VectorPath)–
MEDEC/MESEQ
The microcode engine decode (MEDEC) stage converts x86
instructions into MacroOPs. The microcode engine sequencer
(MESEQ) performs the sequence controls (redirects and
exceptions) for the MENG.
Cycle 6–
IDEC/Rename
At the instruction decoder (IDEC)/rename stage, integer and
floating-point MacroOPs diverge in the pipeline. Integer
MacroOPs are scheduled for execution in the next cycle.
Floating-point MacroOPs have their floating-point stack
Содержание Athlon Processor x86
Страница 1: ...AMD Athlon Processor x86 Code Optimization Guide TM...
Страница 12: ...xii List of Figures AMD Athlon Processor x86 Code Optimization 22007E 0 November 1999...
Страница 16: ...xvi Revision History AMD Athlon Processor x86 Code Optimization 22007E 0 November 1999...
Страница 60: ...44 Code Padding Using Neutral Code Fillers AMD Athlon Processor x86 Code Optimization 22007E 0 November 1999...
Страница 92: ...76 Push Memory Data Carefully AMD Athlon Processor x86 Code Optimization 22007E 0 November 1999...
Страница 122: ...106 Take Advantage of the FSINCOS Instruction AMD Athlon Processor x86 Code Optimization 22007E 0 November 1999...
Страница 156: ...140 AMD Athlon Processor Microarchitecture AMD Athlon Processor x86 Code Optimization 22007E 0 November 1999...
Страница 176: ...160 Write Combining Operations AMD Athlon Processor x86 Code Optimization 22007E 0 November 1999...
Страница 202: ...186 Page Attribute Table PAT AMD Athlon Processor x86 Code Optimization 22007E 0 November 1999...
Страница 252: ...236 VectorPath Instructions AMD Athlon Processor x86 Code Optimization 22007E 0 November 1999...
Страница 256: ...240 Index AMD Athlon Processor x86 Code Optimization 22007E 0 November 1999...