Claims
- 1. A method for determining relative age of a plurality of instructions stored in a circular buffer in a microprocessor capable of performing out-of-order dispatch and execution of said plurality of instructions, said method comprising the steps of:
- assigning a physical destination (Pdst), inducting a wrap bit, for each of said plurality of instructions, wherein said Pdst for each instruction corresponds to an original program order for said plurality of instructions, and said wrap bit indicating whether assignment of Pdsts traversed a linear queue of said circular buffer;
- comparing said Pdsts and said wrap bits of a first instruction and a second instruction for relative age determination;
- designating said instruction comprising the smallest Pdst as said oldest instruction when said wrap bits are equal; and
- designating said instruction comprising the largest Pdst as said oldest instruction when said wrap bits are not equal.
- 2. An apparatus for determining relative age of a plurality of instructions stored in a circular buffer in a microprocessor capable of performing out-of-order dispatch and execution of said plurality of instructions, said apparatus comprising:
- an allocation circuit for assigning a physical destination (Pdst), including a wrap bit, for each of said plurality of instructions, wherein said Pdst for each instruction corresponds to an original program order for said plurality of instructions, and said wrap bit indicates whether assignment of Pdsts traversed a linear queue of said circular buffer;
- a comparator circuit for comparing said Pdsts and said wrap bits of a first instruction and a second instruction for relative age determination; and
- a selection circuit for designating said instruction comprising the smallest Pdst as said oldest instruction when said wrap bits are equal, and for designating said instruction comprising the largest Pdst as said oldest instruction when said wrap bits are not equal.
- 3. A microprocessor comprising:
- an instruction fetch circuit for fetching instructions and predicting branch instructions and corresponding target addresses for said predicted branch instructions;
- an instruction decoder for decoding and issuing said instructions fetched in an original program order;
- an execution cluster comprising at least on execution unit for executing said instructions;
- out-of-order dispatch logic for dispatching said instructions issued to said execution units in said execution cluster based on data dependencies and execution unit availability, said out-of-order dispatch logic being constructed to reorder said instructions in said original program order upon completion of execution;
- a reorder buffer coupled to said out-of-order dispatch logic for storing data, corresponding to said instructions issued;
- an allocation circuit coupled to said instruction decoder for receiving instructions, coupled to said branch execution unit, and coupled to said reorder buffer for assigning a physical destination (Pdst), including a wrap bit, for each of said plurality of instructions, wherein said Pdst for each instruction corresponds to said original program order for said plurality of instructions, and said wrap bit indicates whether assignment of Pdsts traversed a linear queue of said reorder buffer; and
- a branch execution unit for calculating an outcome for said predicted branches, said branch execution unit comprising:
- a comparator circuit for comparing said Pdsts and said wrap bits of a first mispredicted branch instruction and a second mispredicted branch instruction for relative age determination;
- a selection circuit for designating said instruction comprising the smallest Pdst as said oldest instruction when said wrap bits are equal, and for designating said instruction comprising the largest Pdst as said oldest instruction when said wrap bits are not equal; and
- a flushing circuit for clearing said instructions fetched but not issued, said flushing circuit being constructed to clear said instructions fetched but not issued when said oldest branch instruction has been mispredicted.
Parent Case Info
This is a divisional of application Ser. No. 08/204,760, filed Mar. 1, 1994.
US Referenced Citations (6)
Divisions (1)
|
Number |
Date |
Country |
Parent |
204760 |
Mar 1994 |
|