PROCESSOR CONFIGURED TO GENERATE LOOKAHEAD RESULTS AND COLLAPSE MOVES, COMPARES, AND SIMPLE ARITHMETIC INSTRUCTIONS RECEIVING LOOKAHEAD RESULTS

Abstract: A processor includes a lookahead address/result calculation unit which is configured to receive operand information (either the operand or a tag identifying the instruction which will produce the operand value) corresponding to the source operands of one or more instructions. If the operands are available, lookahead address/result calculation unit may generate either a lookahead address for a memory operand of the instruction or a lookahead result corresponding to a functional instruction operation of the instruction. The lookahead address may be provided to a load/store unit for early initiation of a memory operation corresponding to the instruction. The lookahead result may be provided to a speculative operand source (e.g. a future file) for updating therein. A lookahaead state for a register may thereby be provided early in the pipeline. Subsequent instructions may receive the lookahead state and use the lookahead state to generate additional lookahead state early. On the other hand, the subsequent instructions may receive the lookahead state and hence may be prepared for execution upon dispatch to an instruction window (as opposed to waiting in the instruction window for execution of the prior instruction). In one embodiment, the processor also includes an operand collapse unit confgured to collapse the lookahead results into subsequent, concurrently decoded instructions (intraline dependencies). Additionally, the operand collapse unit may be configured to collapse a compare instruction into a subsequent branch instruction which depends upon the result of the compare.

Description: TITLE: PROCESSOR CONFIGURED TO GENERATE LOOKAHEAD RESULTS AND COLLAPSE MOVES, COMPARES, AND SIMPLE ARITHMETIC INSTRUCTIONS RECEIVING LOOKAHEAD RESULTS BACKGROUND OF THE INVENTION 1 Field of the Invention This invention is related to the field of processors and, more particularly, to parallelizing instruction execution withm processors 2 Description of the Related Art Superscalar processors attempt to achieve high performance by dispatching and executing multiple instructions per clock cycle, and by operating at the shortest possible clock cycle time consistent with the design To the extent that a given processor is successful at dispatching and/or executmg multiple instructions per clock cycle, high performance may be realized In order to increase the average number of mstructions dispatched per clock cycle, processor designers have been designing superscalar processors which employ wider issue rates A "wide issue" superscalar processor is capable of dispatching (or issuing) a larger maximum number of mstructions per clock cycle than a "narrow issue" superscalar processor is capable of dispatching During clock cycles m which a number of dispatchable mstructions is greater than the narrow issue processor can handle, the wide issue processor may dispatch more instructions, thereby achievmg a greater average number of instructions dispatched per clock cycle Unfortunately, supporting wider issue rates generally requires a larger amount of execution hardware within the processor If sufficient execution hardware is not provided, then the instruction throughput of the processor may suffer even though the processor is capable of issuing a large number of instructions concurrently The execution hardware may occupy a substantial amount of semiconductor substrate area, mcreasmg the overall die size of the processor and hence its cost Additionally, many instructions are relatively simple mstructions which could be handled by simple execution hardware For example, move instructions which specify only register operands (l e a move from a source register to a destmation register) is a simple instruction requiring almost no hardware to execute Move mstructions having a memory and a register operand involve an address generation but relatively little additional hardware Furthermore, additive mstructions (e g add/subtract/increment/ decrement) having register operands are relatively simple instructions as well The simpler mstructions may be relatively frequent withm common code sequences as well However, the execution hardware must also be capable of executmg the more complex mstructions Some superscalar processors have attempted to provide less costly execution hardware by providmg both complex and snnple execution units and controllmg the issue of mstructions to the execution units such that the simple execution units receive only simple instructions while the more complex units receive either snnple instructions or complex instructions While such a strategy may reduce the area occupied by the execution hardware, the issue logic becomes more complex The complex logic may occupy more area, or may become a clock cycle time lnniter Accordingly, a more efficient method for handlmg the mix of simple and complex instructions is desired In order to support higher clock frequencies (1 e shorter clock cycle times), superscalar processors have been employing longer pipelines (1 e pipelines including more stages) as well as wider issue rates While longer pipelines may result m the achievement of higher clock frequencies, the longer pipelines present additional design challenges as well More particularly, as greater numbers of mstructions may be fetched and placed mto the pipeline prior to previous instructions completmg execution, additional forwardmg hardware may be required to support parallel execution For example, more instructions may progress beyond the operand fetch stage prior to the execution of previous instructions If these mstructions are dependent upon the previous mstructions, the operands for those instructions may not be available when the mstructions reach the operand fetch stage These instructions may be allowed to progress to subsequent pipeline stages if forwarding hardware is provided to route the operands to the instructions as they progress through the pipeline toward execution Unfortunately, the forwarding hardware may be costly in terms of area and complexity as well A more efficient solution for providing operands to dependent instructions is therefore desired As used herein, the term "dependency" is used to refer to relationship between a first instruction and a subsequent second mstruction in which the second instruction requires execution of the first instruction prior to execution of the second instruction For example, the second instruction may include a source operand which is generated via execution of the first instruction Generally, an operand is a value operated upon during execution of an instruction The operands for a particular instruction are located via operand specifiers encoded into the instruction For example, certain operands may be stored in registers employed withm the processor A register operand specifier encoded mto the mstruction selects the particular register stormg the operand The register operand specifier may also be referred to as a register address or a register number On the other hand, other instructions may specify a memory operand stored m a memory location withm a mam memory to which the processor is coupled The memory address is specified via operand specifiers as well For example, the instruction may include a displacement which identifies the memory location storing the memory operand Other instructions may include address operand specifiers which specify register operands used to form the memory address An operand may be a source operand if the operand is an input value for the mstruction An operand may be a destination operand if the operand is the result of the instruction The destmation operand specifier specifies the storage location in which the result of executing mstruction is to be stored SUMMARY OF THE INVENTION The problems outlmed above are in large part solved by a processor in accordance with the present invention The processor includes a lookahead address/result calculation unit which is configured to receive operand information (either the operand or a tag identifying the instruction which will produce the operand value) corresponding to the source operands of one or more mstructions If the operands are available, lookahead address/result calculation unit may generate either a lookahead address for a memory operand of the mstruction or a lookahead result corresponding to a functional instruction operation of the instruction The lookahead address may be provided to a load/store unit for early initiation of a memory operation corresponding to the mstruction The lookahead result may be provided to a speculative operand source (e g a future file) for updatmg therein Advantageously, a lookahead state for a register may be provided early in the pipeline Subsequent mstructions may receive the lookahead state and use the lookahead state to generate additional lookahead state early On the other hand, the subsequent mstructions may receive the lookahead state and hence may be prepared for execution upon dispatch to an mstruction window (as opposed to waitmg in the mstruction window for execution of the prior instruction) The processor may achieve more efficient forwarding in a variety of fashions For example, many instructions may receive lookahead results upon operand fetch, and hence need not wait for subsequent forwarding of operands Furthermore, since some instruction operands may be completed m the lookahead address/result calculation unit, fewer functional units may be required to support a wide issue rate Accordmgly, fewer forwarding buses may be implemented (reflecting the fewer functional units) Additionally, performance may be increased by providing lookahead operands for instructions prior to the instructions producing the lookahead operands reaching the execution stage of the processor pipeline In one embodiment, the processor also includes an operand collapse unit configured to collapse the lookahead results mto subsequent, concurrently decoded mstructions (intraline dependencies) Additionally, the operand collapse unit may be configured to collapse a compare instruction into a subsequent branch instruction which depends upon the result of the compare Advantageously, compare/branch combinations may occupy a single functional unit Broadly speakmg, the present invention contemplates a processor compπsmg an intraline dependency check unit, a lookahead calculation unit, an operand collapse unit, and one or more mstruction windows Coupled to receive a plurality of operand specifiers corresponding to a line of instructions, the intraline dependency check unit is configured to determine dependencies between mstructions withm the line of instructions by comparing the plurality of operand specifiers Coupled to receive one or more operands specified by the plurality of operand specifiers, the lookahead calculation unit is configured to calculate a lookahead result corresponding to a first instruction within the line of mstructions if each operand used by the first mstruction to generate the lookahead result are withm the one or more operands Coupled to the lookahead calculation unit and the intraline dependency check unit, the operand collapse unit is configured to provide the lookahead result as an operand of a second instruction within the line of instructions The operand collapse unit may provide the lookahead result as the operand responsive to (I) an indication from the lookahead calculation unit that the lookahead result is valid, and (n) an indication from the intraline dependency check unit that the second instruction is dependent upon the first instruction Coupled to the operand collapse unit, the mstruction wmdows are configured to store instructions until corresponding operands are provided and to subsequently select the instructions for execution The operand collapse unit is configured to signal the mstructions wmdows to inhibit execution of at least a first instruction operation of the first mstruction represented by the lookahead result if the lookahead result is valid The present invention further contemplates a processor compπsmg an operand collapse unit and one or more instruction wmdows The operand collapse unit is coupled to receive a plurality of operands corresponding to a line of mstructions The operand collapse unit is configured to provide one or more of the plurality of operands corresponding to a first instruction within the line of instructions as operands of a second mstruction within the line of instructions responsive to (I) the first mstruction bemg a compare mstruction, (n) the second instruction being a conditional branch mstruction, and (m) the second mstruction bemg consecutive to the first instruction Coupled to the operand collapse unit, the mstruction wmdows are configured to store mstructions until corresponding operands are provided and to subsequently select the mstructions for execution The operand collapse unit is configured to signal the instructions wmdows to inhibit receipt of first instruction if (1) the first instruction is a compare instruction, (n) the second mstruction is a conditional branch mstruction, and (m) the second instruction is consecutive to the first instruction Moreover, the present mvention contemplates a method for executmg a line of mstructions m a processor The lme of instructions is decoded to detect a plurality of operand specifiers Destination operand specifiers of each instruction within the line of mstructions are compared to source operand specifiers of each subsequent instruction within the line of instructions to detect intraline dependencies A speculative operand source is read to capture source operands specified by the source operand specifiers A lookahead result is calculated for a first mstruction withm the lme if the source operands are available m the speculative operand source An mstruction window configured to receive the first instruction is signalled to inhibit execution of at least a first instruction operation of the first instruction which produces the lookahead result if the lookahead result is successfully calculated The lookahead result is provided to a second instruction within the lme of instructions if the comparing indicates a dependency of the second instruction upon the first instruction The providing is performed prior to storing the second instruction in the instruction window The present invention still further contemplates a computer system comprising a processor and an input/output (I/O) device The processor includes an alignment unit configured to align a line of instructions to a plurality of issue positions, a speculative operand source configured to store speculative operands, an instruction window configured to store instructions until operands are provided for those instructions, and a lookahead collapse unit The lookahead/collapse unit is coupled to the speculative operand source, the instruction window, and the alignment unit, and is configure to read operands from the speculative operand source responsive to the line of instructions received from the alignment unit The lookahead/collapse unit is configured to generate a lookahead result corresponding to a first mstruction withm the lme of mstructions responsive to the operands The lookahead/collapse unit is further configured to update the speculative operand source with the lookahead result, and is further configured to forward the lookahead result to a second mstruction within the lme of instructions which is dependent upon the first instruction The lookahead/collapse unit is configured to signal the instruction window to inhibit execution of at least a first instruction operation of the first instruction which produces the lookahead result Coupled to the processor, the I/O device is configured to communicate between the computer system and another computer system to which the I/O device is coupled BRIEF DESCRIPTION OF THE DRAWINGS Other objects and advantages of the invention will become apparent upon reading the folio wmg detailed description and upon reference to the accompanymg drawings in which Fig 1 is a block diagram of one embodiment of a processor Fig 2 is a block diagram of one embodiment of a fetch/scan unit shown m Fig 1 Fig 3 is a block diagram of one embodiment of a lookahead/collapse unit shown m Fig 1 Fig 4 is a block diagram of portions of the lookahead/collapse unit shown m Fig 3 illustrating interconnection therebetween Fig 5 is a diagram illustrating a portion of one embodiment of a lookahead address/result generation unit shown in Figs 3 and 4 Fig 6 is a truth table according to one embodiment of a control unit shown m Fig 5 for lookahead address generation Fig 7 is a truth table according to one embodiment of a control unit shown in Fig 5 for lookahead result generation Fig 8 is a block diagram of a portion of one embodiment of an operand collapse unit shown in Fig 3 Fig 9 is a block diagram of a flowchart illustrating one embodiment of a control unit illustrated in Fig 8 Fig 10 is a block diagram of a computer system including the processor shown m Fig 1 While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herem be described m detail It should be understood, however, that the drawings and detailed description thereto are not intended to limit the invention to the particular form disclosed, but on the contrary, the mtention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the present invention as defined by the appended claims DETAILED DESCRIPTION OF THE INVENTION Turning now to Fig 1, a block diagram of one embodiment of a superscalar processor 10 is shown Other embodiments are possible and contemplated In the embodiment shown m Fig 1, processor 10 includes a predecode unit 12, an LI I-cache 14, an L0 I-cache 16, a fetch/scan unit 18, an instruction queue 20, an alignment unit 22, a lookahead collapse unit 24, a future file 26, a reorder buffer/register file 28, a first instruction wmdow 30A, a second mstruction wmdow 30B, a plurality of functional units 32A, 32B, 32C, and 32D, a plurality of address generation units 34A, 34B, 34C, and 34D, a load/store unit 36, an LI D-cache 38, an FPU/multimedia unit 40, and an external interface unit 42 Elements referred to herem by a particular reference number followed by various letters will be collectively referred to usmg the reference number alone For example, functional units 32A, 32B, 32C, and 32D will be collectively referred to as functional units 32 In the embodiment of Fig 1, external interface unit 42 is coupled to predecode unit 12, LI D-cache 38, an L2 interface 44, and a bus mterface 46 Predecode unit 12 is further coupled to LI I-cache 14 LI I-cache 14 is coupled to L0 I-cache 16 and to fetch/scan unit 18 Fetch/scan unit 18 is also coupled to L0 I-cache 16 and to instruction queue 20 Instruction queue 20 is coupled to alignment unit 22, which is further coupled to lookahead/collapse unit 24 Lookahead/collapse unit 24 is further coupled to future file 26, reorder buffer/register file 28, load store unit 36, first instruction window 30A, second instruction window 30B, and FPU/multimedia unit 40 FPU/multimedia unit 40 is coupled to load/store unit 36 and to reorder buffer/register file 28 Load/store unit 36 is coupled to LI D-cache 38 First instruction wmdow 30A is coupled to functional units 32A-32B and to address generation units 34A-34B Similarly, second instruction window 30B is coupled to functional units 32C- 32D and address generation units 34C-34D Each of LI D-cache 38, functional units 32, and address generation units 34 are coupled to a plurality of result buses 48 which are further coupled to load/store unit 36, first instruction window 30A, second instruction window 30B, reorder buffer/register file 28, and future file 26 Generally speaking, lookahead/collapse unit 24 is configured to generate lookahead results for certain instructions prior to the dispatch of those mstructions for execution A lookahead result is generated for the certain instructions if the operands used to produce the result are available withm future file 26 upon operand fetch therefrom An operand is available within future file 26 if the value is valid withm future file 26 (as opposed to being a result queue tag identifying the instruction which is to produce the operand as a result upon execution) If a lookahead result is successfully generated, the result is provided to future file 26 for storage and is provided to any dependent instructions withm the same "line" of instructions (I e concurrently decoded with the instruction) Advantageously, speculative results may become available for subsequent mstructions earlier in the pipeline Hence, lookahead results may be calculable for the subsequent instructions Additionally, forwarding may be more efficient as the forwardmg is more frequently accomplished through future file 26 Accordingly, forwarding hardware may be reduced Still further, the amount of execution hardware employed with processor 10 may be reduced while still supporting a wide issue rate because results are generated outside of the execution hardware for the certain mstructions In one embodiment, lookahead/collapse unit 24 is configured to generate a lookahead address for instructions having a memory operand For such mstructions, the address generation mstruction operation otherwise performed by one of address generation units 34 may be performed by lookahead/collapse unit 24 Accordingly, load/store unit 36 may receive the address earlier m the pipeline than would be otherwise achievable If the instruction specifies an additive instruction operation or a register-register move and does not include a memory operand, lookahead/collapse unit 24 may generate a lookahead result Accordingly, the functional instruction operation which would otherwise be executed by one of functional units 32 is performed by lookahead/collapse unit 24 earlier in the pipeline Predecode unit 12 receives mstruction bytes fetched by external interface unit 42 and predecodes the instruction bytes prior to their storage withm LI I-cache 14 Predecode information generated by predecode unit 12 is stored in LI I-cache 14 as well Generally, predecode information is provided to aid m the identification of instruction features which may be useful durmg the fetch and issue of instructions but which may be difficult to generate rapidly during the fetch and issue operation The term "predecode", as used herem, refers to decodmg instructions to generate predecode information which is later stored along with the instruction bytes bemg decoded in an instruction cache (e g LI I-cache 14 and or L0 I-cache 16) In one embodiment, processor 10 employs two bits of predecode information per mstruction byte One of the bits, referred to as the "start bit", mdicates whether or not the mstruction byte is the initial byte of an instruction When a group of mstruction bytes is fetched, the corresponding set of start bits identifies the boundaries between instructions withm the group of mstruction bytes Accordmgly, multiple instructions may be concurrently selected from the group of instruction bytes by scanning the corresponding start bits While start bits are used to locate instruction boundaries by identifying the initial byte of each instruction, end bits could alternatively be used to locate mstruction boundaries by identifying the final byte of each instruction The second predecode bit used m this embodiment, referred to as the "control transfer" bit, identifies which instructions are branch instructions The control transfer bit corresponding to the initial byte of an instruction mdicates whether or not the mstruction is a branch mstruction The control transfer bit corresponding to subsequent bytes of the instruction is a don't care except for relative branch mstructions having a small displacement field According to one particular embodiment, the small displacement field is an 8 bit field Generally, a "small displacement field" refers to a displacement field havmg fewer bits than the target address generated by branch mstructions For relative branch mstructions havmg small displacement fields, the control transfer bit corresponding to the displacement byte is used as described below In addition to generating predecode information corresponding to the mstruction bytes, predecode unit 12 is configured to recode the displacement field of relative branch instructions to actually store the target address m the present embodiment In other words, predecode unit 12 adds the displacement of the relative branch instruction to the address corresponding to the relative branch instruction as defined by the mstruction set employed by processor 10 The resulting target address is encoded mto the displacement field as a replacement for the displacement, and the updated displacement field is stored mto LI I-cache 14 instead of the original displacement field Target address generation is simplified by precomputmg relative target addresses, and hence the branch prediction mechanism may operate more efficiently In one embodiment of processor 10 which employs the x86 instruction set, predecode unit 12 is configured to recode eight bit and 32 bit displacement fields The 32 bit displacement fields may store the entirety of the target address. On the other hand, the eight bit displacement field is encoded More particularly, the eight bit displacement field and corresponding control transfer predecode bit is divided into a cache line offset portion and a relative cache line portion The cache lme offset portion is the cache lme offset portion of the target address The relative cache line portion defines the cache lme identified by the target address (the "target cache line") in terms of a number of cache lines above or below the cache line stormg the relative branch mstruction A first cache line is above a second cache lme if each byte withm the first cache lme is stored at an address which is numerically greater than the addresses at which the bytes withm the second cache line are stored. Conversely, a first cache line is below the second cache lme if each byte withm the first cache lme is stored at an address which is numerically less than the addresses at which the bytes withm a second cache line are stored. A signed eight bit displacement specifies an address which is +/- 128 bytes of the address corresponding to the branch mstruction. Accordingly, the number of above and below cache lines which can be reached by a relative branch mstruction having an eight bit displacement is limited The relative cache lme portion encodes this limited set of above and below cache lines Generally, branch instructions having a small displacement field have displacements withm a predefined range, whereas larger displacement fields may store values outside the predefined range. Tables 1 and 2 below illustrates an exemplary encodmg of the predecode information corresponding to a byte in accordance with one embodiment of processor 10. Table 1: Predecode Encoding Table 2: Target Address Encoding Note Remaming displacement byte bits are the offset within the target cache line Control Transfer Bit is effectively a direction, and the most significant bits of the displacement byte are the number of cache lmes Predecode unit 12 conveys the received mstruction bytes and corresponding predecode information to LI I-cache 14 for storage LI I-cache 14 is a high speed cache memory for storing mstruction bytes and predecode information LI I-cache 14 may employ any suitable configuration, including direct mapped and set associative configurations In one particular embodiment, LI I-cache 14 is a 128 KB, two way set associative cache employing 64 byte cache lines LI I-cache 14 mcludes additional storage for the predecode information corresponding to the mstruction bytes stored therein The additional storage is organized similar to the instruction bytes storage As used herem, the term "cache line" refers to the unit of allocation of storage in a particular cache Generally, the bytes within a cache lme are manipulated (l e allocated and deallocated) by the cache as a unit In one embodiment, LI I-cache 14 is Imearly addressed and physically tagged A cache is Imearly addressed if at least one of the address bits used to mdex the cache is a lmear address bit which is subsequently translated to a physical address bit The tags of a Imearly address/physically tagged cache mclude each translated bit in addition to the bits not used to mdex As specified by the x86 architecture, instructions are defined to generate logical addresses which are translated through a segmentation translation mechanism to a lmear address and further translated through a page translation mechanism to a physical address It is becoming increasingly common to employ flat addressing mode, m which the logical address and corresponding lmear address are equal Processor 10 may be configured to assume flat addressmg mode Accordmgly, fetch addresses, target addresses, etc as generated by executing mstructions are linear addresses In order to determine if a hit is detected in LI I- cache 14, the linear address presented thereto by fetch/scan unit 18 is translated usmg a translation lookaside buffer (TLB) to a corresponding physical address which is compared to the physical tags from the indexed cache lines to determine a hit/miss When flat addressmg mode is not used, processor 10 may still execute code but additional clock cycles may be used to generate lmear addresses from logical addresses L0 I-cache 16 is also a high speed cache memory for storing mstruction bytes Because LI I-cache 14 is large, the access tune of LI I-cache 14 may be large In one particular embodiment, LI I-cache 14 uses a two clock cycle access time In order to allow for single cycle fetch access, L0 I-cache 16 is employed L0 I-cache 16 is comparably smaller than LI I-cache 14, and hence may support a more rapid access time In one particular embodiment, L0 I-cache 16 is a 512 byte fully associative cache Similar to LI I-cache 14, L0 I-cache 16 is configured to store cache lines of mstruction bytes and corresponding predecode information (e g 512 bytes stores eight 64 byte cache lines and corresponding predecode data is stored m additional storage) In one embodiment, LO I-cache 16 may be Imearly addressed and linearly tagged Fetch/scan unit 18 is configured to generate fetch addresses for LO I-cache 16 and fetch or prefetch addresses for LI I-cache 14 Instructions fetched from LO I-cache 16 are scanned by fetch/scan unit 18 to identify instructions for dispatch as well as to locate branch mstructions and to form branch predictions correspondmg to the located branch mstructions Instruction scan information and correspondmg instruction bytes are stored mto instruction queue 20 by fetch/scan unit 18 Additionally, the identified branch mstructions and branch predictions are used to generate subsequent fetch addresses for LO I-cache 16 Fetch/scan unit 18 employs a prefetch algorithm to attempt to prefetch cache lines from LI I-cache 14 to LO I-cache 16 prior to the prefetched cache lines being fetched by fetch/scan unit 18 for dispatch mto processor 10 Any suitable prefetch algorithm may be used One embodiment of the prefetch algorithm is set forth m more detail below Fetch/scan unit 18 employs an aggressive branch prediction mechanism m attempt to fetch larger "runs" of instructions during a clock cycle As used herem, a "run" of mstructions is a set of one or more instructions predicted to be executed in the sequence specified withm the set For example, fetch/scan unit 18 may fetch runs of 24 instruction bytes from LO I-cache 16 Each run is divided mto several sections which fetch/scan unit 18 scans in parallel to identify branch instructions and to generate mstruction scan information for instruction queue 20 According to one embodiment, fetch/scan unit 18 attempts to predict up to two branch mstructions per clock cycle in order support large instruction runs Instruction queue 20 is configured to store instruction bytes provided by fetch/scan unit 18 for subsequent dispatch Instruction queue 20 may operate as a first-m, first-out (FIFO) buffer In one embodiment, instruction queue 20 is configured to store multiple entries, each entry compπsmg a run of mstructions, scan data identifying up to five instructions withm each section of the run, and addresses correspondmg to each section of the run Additionally, instruction queue 20 may be configured to select up to six mstructions withm up to four consecutive run sections for presentation to alignment unit 22 Instruction queue 20 may, for example, employ 2- 3 entries Alignment unit 22 is configured to route mstructions identified by mstruction queue 20 to a set of issue positions within lookahead/collapse unit 24 In other words, alignment unit 22 selects the bytes which form each instruction from the run sections provided by mstruction queue 20 responsive to the scan information provided by instruction queue 20 The instructions are provided mto the issue positions in program order (l e the mstruction which is first in program order is provided to the first issue position, the second mstruction m program order is provided to the second issue position, etc ) Lookahead/collapse unit 24 decodes the instructions provided by alignment unit 22 FPU/multimedia mstructions detected by lookahead collapse unit 24 are routed to FPU/multimedia unit 40 Other mstructions are routed to first instruction window 30A, second instruction window 30B, and/or load/store unit 36 In one embodiment, a particular instruction is routed to one of first mstruction wmdow 30A or second mstruction window 30B based upon the issue position to which the instruction was aligned by alignment unit 22 According to one particular embodiment, instructions from alternate issue positions are routed to alternate instruction windows 30A and 30B For example, instructions from issue positions zero, two, and four may be routed to the first instruction wmdow 30A and mstructions from issue positions one, three, and five may be routed to the second instruction window 30B Instructions which include a memory operation are also routed to load/store unit 36 for access to LI D-cache 38 Additionally, lookahead/collapse unit 24 attempts to generate lookahead addresses or execution results for certain types of mstructions. Lookahead address/result generation may be particularly beneficial for embodiments employmg the x86 mstruction set Because of the nature the x86 mstruction set, many of the instructions m a typical code sequence are versions of snnple moves. One reason for this feature is that x86 instructions include two operands, both of which are source operands and one of which is a destination operand Therefore, one of the source operands of each instruction is overwritten with an execution result Furthermore, the x86 instruction set specifies very few registers for storing register operands Accordmgly, many mstructions are moves of operands to and from a stack maintained withm memory. Still further, many instruction dependencies are dependencies upon the ESP/EBP registers and yet many of the updates to these registers are increments and decrements of the previously stored values To accelerate the execution of these instructions, lookahead/collapse unit 24 generates lookahead copies of the ESP and EBP registers for each of instructions decoded durmg a clock cycle. Additionally, lookahead/collapse unit 24 accesses future file 26 for register operands selected by each instruction For each register operand, future file 26 may be storing either an execution result or a tag identifying a reorder buffer result queue entry corresponding to the most recent mstruction havmg that register as a destmation operand In one embodiment, lookahead/collapse unit 24 attempts to perform an address calculation for each instruction which (I) includes a memory operand; and (n) register operands used to form the address of the memory operand are available from future file 26 or lookahead copies of ESP/EBP Additionally, lookahead/collapse unit 24 attempts to perform a result calculation for each mstruction which: (I) does not mclude a memory operand, (n) specifies an add/subtract operation (including mcrement and decrement), and (in) register operands are available from fumre file 26 or lookahead copies of ESP/EBP In this manner, many simple operations may be completed prior to mstructions bemg sent to mstruction wmdows 30A-30B. Lookahead/collapse unit 24 detects dependencies between a group of instructions bemg dispatched and collapses any execution results generated therein mto mstructions dependent upon those instruction results Additionally, lookahead/collapse unit 24 updates future file 26 with the lookahead execution results Instruction operations which are completed by lookahead/collapse unit 24 (i.e address generations and/or mstruction results are generated and load/store unit 36 or future file 26 and the result queue are updated) are not dispatched to instruction windows 30A-30B Lookahead/collapse unit 24 allocates a result queue entry in reorder buffer/register file 28 for each instruction dispatched. In one particular embodiment, reorder buffer/register file 28 includes a result queue organized in a lme-oπented fashion m which storage locations for execution results are allocated and deallocated in lines havmg enough storage for execution results correspondmg to a maximum number of concurrently dispatchable mstructions If less than the maximum number of mstructions are dispatched, then certain storage locations withm the line are empty. Subsequently dispatched mstructions use the next available lme, leavmg the certain storage locations empty. In one embodiment, the result queue mcludes 40 lmes, each of which may store up to six execution results correspondmg to concurrently dispatched mstructions. Execution results are retired from the result queue m order mto the register file mcluded withm reorder buffer/register file 28. Additionally, the reorder buffer handles branch mispredictions, transmitting the corrected fetch address generated by the execution of the branch instruction to fetch/scan unit 18 Similarly, instructions which generate other exceptions are handled withm the reorder buffer Results corresponding to mstructions subsequent to the exception- generating instruction are discarded by the reorder buffer The register file comprises a storage location for each architected register For example, the x86 instruction set defines 8 architected registers The register file for such an embodiment mcludes eight storage locations The register file may further mclude storage locations used as temporary registers by a microcode unit in embodiments employing microcode units Future file 26 maintains the speculative state of each architected register as instructions are dispatched by lookahead/collapse unit 24 As an mstruction having a register destination operand is decoded by lookahead/collapse unit 24, the tag identifying the storage location with the result queue portion of reorder buffer/register file 28 assigned to the mstruction is stored mto the future file 26 storage location corresponding to that register When the corresponding execution result is provided, the execution result is stored into the corresponding storage location (assuming that a subsequent instruction which updates the register has not been dispatched) It is noted that, in one embodiment, a group of up to six instructions is selected from instruction queue 20 and moves through the pipeline withm lookahead/collapse unit 24 as a unit If one or more mstructions withm the group generates a stall condition, the entire group stalls An exception to this rule is if lookahead/collapse unit 24 generates a split lme condition due to the number of ESP updates within the group) Such a group of instructions is referred to as a "lme" of instructions herein Instruction windows 30 receive instructions from lookahead/collapse unit 24 Instruction windows 30 store the instructions until the operands correspondmg to the instructions are received, and then select the instructions for execution Once the address operands of an mstruction mcludmg a memory operation have been received, the instruction is transmitted to one of the address generation units 34 Address generation units 34 generate an address from the address operands and forward the address to load/store unit 36 On the other hand, once the execution operands of an mstruction have been received, the mstruction is transmitted to one of the functional units 32 for execution In one embodiment, each mteger wmdow 30A-30B mcludes 25 storage locations for mstructions Each integer window 30A-30B is configured to select up to two address generations and two functional unit operations for execution each clock cycle m the address generation units 34 and functional units 32 connected thereto In one embodiment, mstructions fetched from L0 I-cache 16 remam m the order fetched until stored into one of mstruction wmdows 30, at which pomt the instructions may be executed out of order In embodiments of processor 10 employmg the x86 instruction set, an mstruction may mclude implicit memory operations for load/store unit 36 as well as explicit functional operations for functional units 32 Instructions havmg no memory operand do not include any memory operations, and are handled by functional units 32 Instructions having a source memory operand and a register destination operand mclude an implicit load memory operation handled by load/store unit 36 and an explicit functional operation handled by functional units 32 Instructions havmg a memory source/destmation operand mclude implicit load and store memory operations handled by load/store unit 36 and an explicit functional operation handled by functional units 32 Finally, instructions which do not have an explicit functional operation are handled by load/store unit 36 Each memory operation results m an address generation handled either by lookahead/collapse unit 24 or address generation units 34 Memory operations and instructions (l e functional operations) may be referred to herein separately, but may be sourced from a single instruction Address generation units 34 are configured to perform address generation operations, thereby generatmg addresses for memory operations in load/store unit 36 The generated addresses are forwarded to load/store unit 36 via result buses 48 Functional units 32 are configured to perform integer arithmetic/logical operations and execute branch instructions Execution results are forwarded to future file 26, reorder buffer/register file 28, and instruction windows 30A-30B via result buses 48 Address generation units 34 and functional units 32 convey the result queue tag assigned to the instruction bemg executed upon result buses 48 to identify the mstruction being executed In this manner, fumre file 26, reorder buffer/register file 28, mstruction wmdows 30A-30B, and load/store unit 36 may identify execution results with the corresponding instruction FPU/multimedia unit 40 is configured to execute floating point and multimedia instructions Load/store unit 36 is configured to interface with LI D-cache 38 to perform memory operations A memory operation is a transfer of data between processor 10 and an external memory The memory operation may be an explicit instruction, or may be implicit portion of an instruction which also includes operations to be executed by functional units 32 Load memory operations specify a transfer of data from external memory to processor 10, and store memory operations specify a transfer of data from processor 10 to external memory If a hit is detected for a memory operation withm LI D-cache 38, the memory operation is completed therem without access to external memory Load/store unit 36 may receive addresses for memory operations from lookahead/collapse unit 24 (via lookahead address calculation) or from address generation units 34 In one embodiment, load/store unit 36 is configured perform up to three memory operations per clock cycle to LI D- cache 38 For this embodiment, load/store unit 36 may be configured to buffer up to 30 load/store memory operations which have not yet accessed D-cache 38 The embodiment may further be configured to mclude a 96 entry miss buffer for buffering load memory operations which miss D-cache 38 and a 32 entry store data buffer Load store unit 36 is configured to perform memory dependency checkmg between load and store memory operations LI D-cache 38 is a high speed cache memory for storing data Any suitable configuration may be used for LI D-cache 38, including set associative and direct mapped configurations In one particular embodiment, LI D-cache 38 is a 128 KB two way set associative cache employmg 64 byte lmes LI D-cache 38 may be organized as, for example, 32 banks of cache memory per way Additionally, LI D-cache 38 may be a Imearly addressed/physically tagged cache employing a TLB similar to LI I-cache 14 External interface unit 42 is configured to transfer cache lines of instruction bytes and data bytes mto processor 10 in response to cache misses Instruction cache lines are routed to predecode unit 12, and data cache lines are routed to LI D-cache 38 Additionally, external mterface unit 42 is configured to transfer cache lmes discarded by LI D-cache 38 to memory if the discarded cache lmes have been modified to processor 10 As shown in Fig 1 , external interface unit 42 is configured to mterface to an external L2 cache via L2 interface 44 as well as to mterface to a computer system via bus mterface 46 In one embodiment, bus interface unit 46 comprises an EV/6 bus interface Turning now to Fig 2, a block diagram of one embodiment of fetch/scan unit 18 is shown Other embodiments are possible and contemplated As shown m Fig 2, fetch/scan unit 18 includes a fetch control unit 50, a plurality of select next blocks 52A-52C, an mstruction select multiplexor (mux) 54, an instruction scanner 56, a branch scanner 58, a branch history table 60, a branch select mux 62, a return stack 64, an indirect address cache 66, and a forward collapse unit 68 Fetch control unit 50 is coupled to LI I-cache 14, LO I-cache 16, indirect address cache 66, return stack 64, branch history table 60, branch scanner 58, and mstruction select mux 54 Select next block 52A is coupled to LI I-cache 14, while select next blocks 52B-52C are coupled to LO I- cache 16 Each select next block 52 is coupled to instruction select mux 54, which is further coupled to branch scanner 58 and instruction scanner 56 Instruction scanner 56 is coupled to instruction queue 20 Branch scanner 58 is coupled to branch history table 60, return stack 64, and branch select mux 62. Branch select mux 62 is coupled to indirect address cache 66 Branch history table 60 and branch scanner 58 are coupled to forward collapse unit 68, which is coupled to instruction queue 20 Fetch control unit 50 receives branch prediction information (including target addresses and taken/not taken predictions) from branch scanner 58, branch history table 60, return stack 64, and indirect address cache 66 Responsive to the branch prediction information, fetch control unit 50 generates fetch addresses for L0 I-cache 16 and a fetch or a prefetch address for LI I-cache 14. In one embodiment, fetch control unit 50 generates two fetch addresses for L0 I-cache 16 The first fetch address is selected as the target address correspondmg to the first branch instruction identified by branch scanner 58 (if any) The second fetch address is the sequential address to the fetch address selected in the previous clock cycle (i.e. the fetch address correspondmg to the run selected by instruction select mux 54) L0 I-cache 14 provides the cache lmes (and predecode information) correspondmg to the two fetch addresses, as well as the cache lines (and predecode information) which are sequential to each of those cache lines, to select next blocks 52B-52C. More particularly, select next block 52B receives the sequential cache lme correspondmg to the sequential address and the next mcremental cache lme to the sequential cache lme. Select next block 52C receives the target cache line correspondmg to the target address as well as the cache lme sequential to the target cache line Additionally, select next blocks 52B-52C receive the offset portion of the corresponding fetch address Select next blocks 52B-52C each select a run of mstruction bytes (and corresponding predecode information) from the received cache lines, beginning with the run section mcludmg the offset portion of the correspondmg fetch address. Smce the offset portion of each fetch address can begm anywhere withm the cache lme, the selected run may included portions of the fetched cache lme and the sequential cache lme to the fetched cache lme Hence, both the fetched cache line and the sequential cache lme are received by select next blocks 52B-52C Similarly, select next block 52A receives a prefetched cache line (and correspondmg predecode information) from LI I-cache 14 and selects an instruction run therefrom. Smce one cache lme is prefetched from LI I-cache 14, the run selected therefrom may comprise less than a full run if the offset portion of the prefetch address is near the end of the cache line. It is noted that the fetch cache lmes from L0 I-cache 16 may be provided in the same clock cycle as the correspondmg addresses are generated by fetch control unit 50, but the prefetch cache line may be a clock cycle delayed due to the larger size and slower access tune of LI I-cache 14 In addition to providing the prefetched cache lme to select next block 52A, LI I-cache 14 provides the prefetched cache line to L0 I-cache 16 If the prefetched cache lme is already stored within L0 I-cache 16, L0 I-cache 16 may discard the prefetched cache line However, if the prefetched cache line is not already stored m LO I-cache 14, the prefetched cache line is stored mto LO I-cache 16 In this manner, cache lmes which may be accessed presently are brought mto LO I-cache 16 for rapid access therefrom According to one exemplary embodiment, LO I-cache 16 comprises a fully associative cache structure of eight entries A fully associative structure may be employed due to the relatively small number of cache lines included in LO I-cache 16 Other embodiments may employ other organizations (e g set associative or direct-mapped) Fetch control unit 50 selects the instruction ran provided by one of select next blocks 52 in response to branch prediction information by controllmg mstruction select mux 54 As will be explamed in more detail below, fetch control unit 50 receives (in the present embodiment) target addresses from branch scanner 58, return stack 64, and indirect address cache 66 early m the clock cycle as well as at least a portion of the opcode byte of the first branch mstruction identified by branch scanner 58 Fetch control unit 50 decodes the portion of the opcode byte to select the target address to be fetched from LO I-cache 16 from the various target address sources and provides the selected target address to LO I-cache 16 In parallel, the sequential address to the fetch address selected in the previous clock cycle (either the target address or the sequential address from the previous clock cycle, depending upon the branch prediction from the previous clock cycle) is calculated and provided to LO I- cache 16 Branch prediction information (I e taken or not taken) is provided by branch history table 60 late m the clock cycle If the branch instruction correspondmg to the target address fetched from L0 I-cache 16 is predicted taken, then fetch control unit 50 selects the instruction run provided by select next block 52C On the other hand, if the branch instruction is predicted not taken, then the mstruction run selected by select next block 52B is selected The instruction ran provided by select next block 52A is selected if a predicted fetch address missed L0 I-cache 16 m a previous clock cycle and was fetched from LI I-cache 14 Additionally, the mstruction ran from LI I-cache 14 is selected if the instruction run was fetched responsive to a branch mstruction have a 32 bit displacement or indirect target address generation or an L0 I-cache miss was fetched The selected instruction ran is provided to instruction scanner 56 and branch scanner 58 Instruction scanner 56 scans the predecode mformation correspondmg to the selected mstruction ran to identify mstructions within the mstruction run More particularly in one embodiment, mstruction scanner 56 scans the start bits correspondmg to each ran section m parallel and identifies up to five mstructions within each ran section Pointers to the identified mstructions (offsets withm the ran section) are generated The pomters, instruction bytes and addresses (one per run section) are conveyed by instruction scanner 56 to mstruction queue 20 If a particular ran section mcludes more than five mstructions, the mformation correspondmg to run sections subsequent to the particular run section is invalidated and the particular run section and subsequent run sections are rescanned during the next clock cycle Branch scanner 58 scans the instruction run m parallel with instruction scanner 56 Branch scanner 58 scans the start bits and control transfer bits of the mstruction ran to identify the first two branch mstructions withm the instruction ran As described above, a branch mstruction is identified by the control transfer bit correspondmg to the start byte of an mstruction (as identified by the start bit) bemg set Upon locatmg the first two branch mstructions, branch scanner 58 assumes that the instructions are relative branch mstructions and selects the corresponding encoded target addresses from the mstruction bytes following the start byte of the branch instruction For embodiments employing the x86 instruction set, a nme bit target address (the displacement byte as well as the correspondmg control transfer bit) is selected, and a 32 bit target address is selected as well Furthermore, at least a portion of the opcode byte identified by the start and control transfer bits is selected The target addresses and opcode bytes are routed to fetch control unit 50 for use m selectmg a target address for fetching from LO I-cache 16 The fetch addresses of each branch mstruction (determined from the fetch address of the ran section including each branch instruction and the position of the branch instruction withm the section) are routed to branch history table 60 for selectmg a taken/not-taken prediction correspondmg to each branch instruction Furthermore, the fetch addresses correspondmg to each branch instruction are routed to branch select mux 62, which is further routed to indirect address cache 66 The target address of each branch instruction is routed to forward collapse unit 68 According to one embodiment, branch scanner 58 is configured to scan each run section in parallel for the first two branch instructions and then to combme the scan results to select the first two branch instructions within the run Branch scanner 58 may further be configured to determine if a subroutine call instruction is scanned during a clock cycle Branch scanner 58 may forward the fetch address of the next instruction following the detected subroutine call mstraction to return stack 64 for storage therein In one embodiment, if there are more than two branch instructions withm a ran, the run is scanned agam during a subsequent clock cycle to identify the subsequent branch instruction The fetch addresses of the identified branch mstructions are provided to branch history table 60 to determine a taken/not taken prediction for each instruction Branch history table 60 compnses a plurality of taken/not-taken predictors correspondmg to the previously detected behavior of branch mstructions One of the predictors is selected by maintammg a history of the most recent predictions and exclusive ORmg those most recent predictions with a portion of the fetch addresses correspondmg to the branch mstructions The least recent (oldest) prediction is exclusive ORed with the most significant bit withm the portion of the fetch address, and so forth through the most recent prediction bemg exclusive ORed with the least significant bit withm the portion of the fetch address Since two predictors are selected per clock cycle, the predictor correspondmg to the second branch instruction is dependent upon the prediction of the first branch instruction (for exclusive ORmg with the least significant bit of the corresponding fetch address) Branch history table 60 provides the second predictor by selecting both of the predictors which might be selected (l e the predictor that would be selected if the first branch instruction is predicted not-taken and the predictor that would be selected if the first branch mstraction is predicted taken) and then selecting one of the two predictors based on the actual prediction selected for the first branch instruction Branch history table 60 receives information regardmg the execution of branch mstructions from functional units 32A-32D The history of recent predictions correspondmg to the executed branch instruction as well as the fetch address of the executed branch mstruction are provided for selecting a predictor to update, as well as the taken/not taken result of the executed branch instruction Branch history table 60 selects the corresponding predictor and updates the predictor based on the taken/not taken result In one embodiment, the branch history table stores a bimodal counter The bimodal counter is a saturating counter which saturates at a minimum and maximum value (l e subsequent decrements of the minimum value and increments of the maximum value cause no change m the counter) Each time a branch mstruction is taken, the corresponding counter is incremented and each tune a branch mstruction is not taken, the corresponding counter is decremented The most significant bit of the counter indicates the taken/not taken prediction (e g taken if set, not taken if clear) In one embodiment, branch history table 60 stores 64K predictors and maintains a history of the 16 most recent predictions Each clock cycle, the predictions selected during the clock cycle are shifted mto the history and the oldest predictions are shifted out of the history Return stack 64 is used to store the return addresses correspondmg to detected subroutme call instructions Return stack 64 receives the fetch address of a subroutme call instruction from branch scanner 58 The address of the byte following the call instruction (calculated from the fetch address provided to return stack 64) is placed at the top of return stack 64 Return stack 64 provides the address stored at the top of the return stack to fetch control unit 50 for selection as a target address if a return instruction is detected by branch scanner 58 and fetch control unit 50 In this manner, each return instruction receives as a target address the address corresponding to the most recently detected call instruction Generally in the x86 instruction set, a call mstruction is a control transfer instruction which specifies that the sequential address to the call mstruction be placed on the stack defined by the x86 architecture A return mstraction is an mstruction which selects the target address from the top of the stack Generally, call and return instructions are used to enter and exit subroutines withm a code sequence (respectively) By placing addresses corresponding to call instructions in return stack 64 and usmg the address at the top of return stack 64 as the target address of return instructions, the target address of the return instruction may be correctly predicted In one embodiment, return stack 64 may comprise 16 entries Indirect address cache 66 stores target addresses correspondmg to previous executions of mdirect branch instructions The fetch address correspondmg to an indirect branch instruction and the target address corresponding to execution of the indirect branch instruction are provided by functional units 32A-32D to indirect address cache 66 Indirect address cache 66 stores the target addresses mdexed by the correspondmg fetch addresses Indirect address cache 66 receives the fetch address selected by branch select mux 62 (responsive to detection of an indirect branch instruction) and, if the fetch address is a hit in indirect address cache 66, provides the corresponding target address to fetch control unit 50 In one embodiment, indirect address cache 66 may comprise 32 entries Accordmg to one contemplated embodiment, if indirect address cache 66 detects a miss for a fetch address, mdirect address cache 66 may be configured to select a target address to provide from one of the entries In this manner, a "guess" at a branch target is provided in case an indirect branch mstruction is decoded Fetchmg from the guess may be performed rather than awaitmg the address via execution of the mdirect branch mstraction Alternatively, another contemplated embodiment awaits the address provided via execution of the indirect branch instruction It is noted that, if an encoded target address is selected, the actual target address may be presented to L0 I-cache 16 Fetch control unit 50 may be configured to precalculate each of the possible above/below target addresses and select the correct address based on the encoded target address Alternatively, fetch control unit 50 may record which L0 I-cache storage locations are storing the above and below cache lines, and select the storage locations directly without a tag compare Forward collapse unit 68 receives the target addresses and positions withm the mstraction run of each selected branch instruction as well as the taken/not taken predictions Forward collapse unit 68 determines which instructions within the run should be cancelled based upon the received predictions If the first branch mstruction is predicted taken and is backward (1 e the displacement is negative), all mstructions subsequent to the first branch instruction are cancelled If the first branch mstruction is predicted taken and is forward but the displacement is small (e g within the mstruction run), the mstructions which are between the first branch instruction and the target address are cancelled The second branch instruction, if still within the run according to the first branch instruction's prediction, is treated similarly Cancel indications for the mstructions withm the run are set to instruction queue 20 Turning now to Fig 3, a block diagram of one embodiment of lookahead/collapse unit 24 is shown Other embodiments are possible and contemplated As shown in Fig 3, lookahead/collapse unit 24 includes a plurality of decode units 70A-70F, an ESP/EBP lookahead unit 72, an immediate field generation unit 73, an mtralme dependency check unit 75, a lookahead address/result calculation unit 74, a dispatch control unit 76, and an operand collapse unit 78 Decode units 70A-70F are coupled to receive mstructions from alignment unit 22 Decode units 70A-70F are coupled to provide decoded mstructions and/or mstraction mformation to FPU/multimedia unit 40, ESP/EBP lookahead unit 72, immediate field generation unit 73, mtralme dependency check unit 75, fumre file 26, and lookahead address/result calculation unit 74 ESP/EBP lookahead unit 72 is coupled to lookahead address/result calculation unit 74, as is future file 26, immediate field generation unit 73, and mtralme dependency check unit 75 Lookahead address/result calculation unit 74 is further coupled load/store unit 36 and dispatch control unit 76 Dispatch unit 76 is further coupled to operand collapse unit 78, future file 26, load/store unit 36, and reorder buffer 28 Operand collapse unit 78 is coupled to mstraction windows 30 Each decode unit 70A-70F forms an issue position to which alignment unit 22 aligns an instruction While not indicated specifically throughout Fig 3 for simplicity the drawmg, a particular instruction remams within its issue position as the instruction moves through lookahead/collapse unit 24 and is routed to one of instruction windows 30A-30B if not completed withm lookahead/collapse unit 24 Decode units 70A-70F route FPU/multimedia mstructions to FPU/multimedia unit 40 However, if the FPU/multimedia instructions mclude memory operands, memory operations are also dispatched to load/store unit 36 m response to the mstruction through lookahead address/result calculation unit 74 Additionally, if the address for the memory operations cannot be generated by lookahead address/result calculation unit 74, an address generation operation is dispatched to one of address generation units 34A-34D via mstraction windows 30A-30B Still further, entries withm reorder buffer 28 are allocated to the FPU/multimedia mstructions for maintenance of program order Generally, entries within reorder buffer 28 are allocated from decode units 70A-70F for each instruction received therem Each of decode units 70A-70F may be configured to provide the opcode and mod r/m bytes of the instruction being decoded therein to ESP/EBP lookahead unit 72 ESP/EBP lookahead unit 72 may determine (I) whether or not the mstruction uses the ESP or EBP registers as a source operand, and (n) whether not the instruction modifies the ESP/EBP registers (I e has the ESP or EBP registers as a destmation operand) ESP/EBP lookahead unit 72 generates lookahead mformation for each instruction which uses the ESP or EBP registers as a source operand The lookahead information may mclude a constant to be added to the current lookahead value of the corresponding register and/or an indication of a dependency upon an mstruction m a prior issue position In one embodiment, ESP/EBP lookahead unit 72 is configured to provide lookahead mformation as long as the lme of instructions provided by decode units 70A-70F do not mclude more than (1) two push operations (which decrement the ESP register by a constant value), (n) two pop operations (which mcrement ESP register by a constant value), (in) one move to ESP register, (IV) one arithmetic/logical mstraction having the ESP as a destination, or (v) three instructions which update ESP If one of these restrictions is exceeded, ESP/EBP lookahead unit 72 is configured to stall mstructions beyond those which do not exceed restrictions until the succeedmg clock cycle (a "split line" case) For those mstructions preceded, in the same clock cycle but m earlier issue positions, by instructions which increment or decrement the ESP register, ESP/EBP lookahead unit 72 generates a constant indicating the combined total modification to the ESP register of the preceding mstructions For those mstructions preceded by a move or arithmetic operation upon the ESP or EBP registers, ESP/EBP lookahead unit 72 generates a value identifying the issue position contammg the move or arithmetic mstraction The lookahead values may be used by lookahead address/result calculation unit 74 to generate either a lookahead address correspondmg to the instruction withm the issue position (thereby inhibiting an address generation operation which would otherwise be performed by one of address generation units 34A-34D) or a lookahead result corresponding to the instruction (thereby providing lookahead state to fumre file 26 earlier m the pipeline) Performance may be mcreased by removmg address generation operations and/or providing lookahead state prior to execution of the instruction operations withm functional units 32A-32D and address generation units 34A-34D Many x86 code sequences mclude a large number of relatively simple operations such as moves of values from a source to destination without arithmetic/logical operation or simple arithmetic operations such as add/subtract by small constant or increment/decrement of a register operand Accordmgly, functional units 32A- 32D may typically execute the more complex arithmetic/logical operations and branch mstructions and address generation units 34A-34D may typically perform the more complex address generations Instraction throughput may thereby be increased Immediate field generation unit 73 may be configured to extract immediate data fields from the lme of instructions decoded therem (as used herem, the immediate data may be a displacement for use in address generation or immediate data for use m a functional mstruction operation) The immediate data is routed to lookahead address/result calculation unit 74 Additionally, decode units 70A-70F are configured to identify register operand specifiers used by the mstructions and to route register operand requests to future file 26 Future file 26 returns corresponding speculative register values or result queue tags for each register operand Intraline dependency check unit 75 provides dependency checking between the lme of mstructions Operand collapse unit 78 receives the dependency mformation generated by mtralme dependency check unit 75 for routing appropπate operands for each mstruction Lookahead address/result calculation unit 74 receives the lookahead values from ESP/EBP lookahead units 72, the immediate data from immediate field generation unit 73, and the speculative register values or result queue tags from fumre file 26 Lookahead address/result calculation unit 74 attempts to generate either a lookahead address correspondmg to a memory operand of the instruction, or a lookahead result if the mstruction does not include a memory operand For example, simple register to register move operations can be completed (with respect to functional units 32 and address generation units 34) by routing the source operand as the destmation operand Move operations employmg a memory operation and a register destination can be completed (with respect to functional units 32 and address generation units 34) if an address generation can be performed by lookahead address/result calculation unit 74 In one embodiment, lookahead address/result calculation unit 74 is configured to compute addresses using displacement only, register plus displacement, ESP/EBP plus displacement, and scale-mdex-base addressing mode except for mdex or base registers bemg ESP/EBP Load/store unit 36 performs the memory operation and returns the memory operation results via result buses 48 Even if no address is generated for a memory operation by lookahead address/result calculation unit 74, lookahead address/result calculation unit 74 indicates the memory operation and correspondmg result queue tag to load/store unit 36 to allocate storage within load/store unit 36 for the memory operation Simple arithmetic operations which mcrement or decrement a source operand, add/subtract a small immediate value to a source operand, or add/subtract two register source operands may also be completed via lookahead address/result calculation unit 74 if the source operands are available from fumre file 26 (l e a speculative register value is received instead of a result queue tag) Instructions completed by lookahead address/result calculation units 74 are indicated as completed and are allocated entries m reorder buffer 28 but are not dispatched to instruction windows 30 Lookahead address/result calculation unit 74 may comprise, for example, an adder for each issue position along with corresponding control logic for selectmg among the lookahead values, immediate data, and speculative register values It is noted that snnple arithmetic operations may still be forwarded to instruction wmdows 30 for generation of condition flags, according to the present embodiment However, generating the functional result m lookahead address/result calculation unit 74 provides the lookahead state early, allowing subsequent address generations/instructions to be performed early as well Lookahead address/result calculation unit 74 may be configured to keep separate lookahead copies of the ESP/EBP registers in addition to the future file copies However, if updates to the ESP/EBP are detected which cannot be calculated by lookahead address/result calculation unit 74, subsequent mstructions may be stalled until a new lookahead copy of the ESP/EBP can be provided from future file 26 (after execution of the mstraction which updates ESP/EBP in the undeterminable manner) Dispatch control unit 76 determines whether or not a group of mstructions are dispatched to provide pipeline flow control Dispatch control unit 76 receives mstruction counts from mstruction wmdows 30 and load/store counts from load/store unit 36 and, assuming the maximum possible number of instructions are m flight in pipeline stages between dispatch control units 76 and mstraction wmdows 30 and load/store unit 36, determines whether or not space will be available for stormg the mstructions to be dispatched withm mstraction windows 30 and/or load/store unit 36 when the mstructions arrive therem If dispatch control unit 76 determines that insufficient space will be available m load/store unit 36 and either mstraction wmdow 30, dispatch is stalled until the instruction counts received by dispatch control unit 76 decrease to a sufficiently low value Upon releasmg instructions for dispatch through dispatch control unit 76, future file 26 and reorder buffer 28 are updated with speculatively generated lookahead results In one embodiment, the number of non- ESP/EBP updates supported may be limited to, for example, two m order to limit the number of ports on fumre file 26 Furthermore, operand collapse unit 78 collapses speculatively generated lookahead results mto subsequent, concurrently decoded mstructions which depend upon those results as mdicated by the previously determined mtralme dependencies In this manner, the dependent mstructions receive the speculatively generated lookahead results since these results will not subsequently be forwarded from functional units 32A-32D Those instructions not completed by lookahead address/result calculation unit 74 are then transmitted to one of instruction windows 30A-30B based upon the issue position to which those mstructions were aligned by alignment unit 22 It is noted that certain embodiments of processor 10 may employ a microcode unit (not shown) for executing complex mstructions by dispatchmg a plurality of simpler instructions referred to as a microcode routme Decode units 70A-70F may be configured to detect which instructions are microcode instructions and to route the microcode instructions to the microcode unit For example, the absence of a directly decoded instruction output from a decode unit 70 which received a valid instruction may be an indication to the microcode unit to begin execution for the corresponding valid mstraction It is further noted that various storage devices are shown in Figs 2 and 3 (e g devices 79A, 79B, and similar devices in Fig 2 and devices 79C, 79D and similar devices in Fig 3) The storage devices represent latches, registers, flip-flops and the like which may be used to separate pipeline stages However, the particular pipeline stages shown in Figs 2 and 3 are but one embodiment of suitable pipeline stages for one embodiment of processor 10 Other pipeline stages may be employed m other embodiments It is noted that, while the x86 instruction set and architecture has been used as an example above and may be used as an example below, any instruction set and architecture may be used Additionally, displacements may be any desirable size (m addition to the 8 bit and 32 bit sizes used as examples herein) Furthermore, while cache line fetchmg may be described herein, it is noted that cache lines may be sectors, and sectors may be fetched, if desirable based upon cache lme size and the number of bytes desired to be fetched Turning now to Fig 4, a block diagram illustrating decode unit 70A, ESP/EBP lookahead unit 72, intralme dependency check unit 75, immediate field generation unit 73, and an mstruction bytes storage 80 is shown Interconnection between the illustrated blocks accordmg to one embodiment of processor 10 is shown m Fig 4 Other embodiments employmg additional, alternative, and/or different interconnection schemes are contemplated In the embodiment Fig 4, decode unit 70A is coupled to an opcode/mod R/M bus 82A, a source and destination register specifier bus 84 A, and a start position bus 86A Start position bus 86A and opcode/mod R M bus 82 A are coupled to immediate field generation unit 73 which is further coupled to instruction bytes storage 80 Opcode/mod R/M bus 82A is further coupled to ESP/EBP lookahead unit 72 Source and destmation register specifier bus 84A is coupled to mtralme dependency check unit 75, which is further coupled to similar source and destmation registers specifier buses 84B-84F from other decode units 70 ESP/EBP lookahead unit 72 is coupled to a lookahead ESP/EBP bus 88 and a constant bus 90 A which are further coupled to lookahead address/result calculation unit 74 Intralme dependency check unit 75 is coupled to a dependency bus 92 which is further coupled to operand collapse unit 78 Immediate field generation unit 73 is coupled to an immediate field bus 94A and a compare lme 96A Compare line 96A is coupled operand collapse unit 78, and immediate field bus 94A is coupled to lookahead address/result calculation unit 74 Buses and lmes referred to with a reference number followed by a letter correspond to the mstruction bemg decoded by decode unit 70A Similar interconnect may be provided, correspondmg to the mstructions bemg concurrently decoded by decode units 70B-70F For simplicity m the drawmg, the interconnect correspondmg to the other mstructions bemg concurrently decoded have not necessarily been shown m Fig 4 (and subsequent figures below) However, similar interconnect to that shown may be provided for the other mstructions withm the lme Decode unit 70A decodes an mstraction provided by mstruction alignment unit 22 and detects the start position of the mstraction withm the mstraction bytes correspondmg to the lme of mstructions concurrently provided by mstraction alignment unit 22 to the decode units 70A-70F. The instruction bytes correspondmg to the lme are stored m mstraction storage 80 (which may be a register, for example), and decode unit 70A receives the portion of mstruction used by decode unit 70A to perform its decode In one embodiment, decode unit 70A receives the prefix, opcode, and mod R M bytes corresponding to the mstraction bemg decoded as well as the start position of the mstraction within the instruction bytes corresponding to the line Other embodiments may receive differmg portions of the mstraction dependmg upon the mstruction set architecture employed by the embodiment Decode unit 70A identifies the source and destination register operand specifiers for the instruction and conveys the specifiers on source and destination register specifier bus 84A In the present embodiment, an instruction may have up to two source operands and one destination operand If the mstraction includes a memory operand, the source operands may include address operands Additionally, decode unit 70A conveys the start position of the instruction on start position bus 86A ESP/EBP lookahead unit 72 receives the opcode and mod R/M bytes and determines if the corresponding instruction has the ESP or EBP registers as source operands, as well as whether or not the instruction specifies an update of either register ESP/EBP lookahead unit 72 provides a lookahead ESP and a lookahead EBP value upon lookahead ESP/EBP bus 88. The lookahead register values correspond to the cumulative the results of instructions dispatched prior to the lme of mstructions bemg decoded by decode units 70A-70F. Additionally, ESP/EBP lookahead unit 72 generates a constant which is to be added to the lookahead ESP or EBP value to generate a source operand for the mstruction bemg decoded by decode unit 70A. Similar constants may be generated for other mstructions withm lme. The constant for each issue position represents the cumulative effect of the instructions prior to and including the instruction correspondmg to that issue position withm the line In the case of decode unit 70A, there are no mstructions prior to the mstruction withm the lme, and hence the constant corresponds to a modification to the correspondmg register which is performed prior to using the value as a source operand for the mstraction. For example, the PUSH mstraction defined by the x86 instruction set architecture specifies that the ESP register value is decremented prior to using the value as an address operand for the instruction Intraline dependency check unit 75 receives the source and destmation register specifiers from decode unit 70A as well as from other decode units 70B-70F. Intralme dependency check unit 75 performs a dependency check for each source operand corresponding to an mstraction withm a particular issue position agamst the destination operands of each prior instruction withm line. If a dependency is detected, a correspondmg indication upon dependency bus 92 is provided. Accordingly, dependency bus 92 mcludes an indication for each possible source operand indicating whether or not a dependency is detected for that source operand as well as which issue position the source operand is dependent upon For example, dependency bus 92 may mclude a dependency signal corresponding to each source operand as well as an issue position number correspondmg to each source operand Immediate field generation unit 73 decodes the opcode and mod R/M bytes of the mstraction to determine if an immediate field is mcluded in the mstraction Immediate field generation unit 73 extracts the immediate field from mstruction bytes storage 80 and provides immediate field upon immediate field bus 94A. In one embodiment, immediate fields of various sizes are supported (e g. 8 bit and 32-bit) Immediate field generation unit 73 may be configured to sign extend or zero extend the smaller immediate fields to the size of the largest supported immediate field as appropriate. Additionally, if the instruction is an increment/decrement instruction, immediate field generation unit 73 may be configured to generate a constant for the immediate field reflecting the size of the increment/decrement If the instruction does not include an immediate field and is not an increment/decrement instruction, immediate field generation unit 73 may be configured to generate a zero value upon immediate field bus 94A Immediate field generation unit 73 may further be configured to perform similar operations corresponding to instructions withm other decode units 70 Immediate field generation unit 73 selects the immediate field from instruction bytes storage 80 accordmg to the start position provided by decode unit 70A and a decode of the opcode and mod R/M bytes In the present embodiment, instruction bytes storage 80 stores the instruction bytes corresponding to the line of instructions bemg concurrently decoded. The mstructions bytes are pipelined with the line of instructions, allowing various fields of the mstraction to be extracted as desired In other embodiments, the mstructions may be entirely routed withm each issue position (mstead of routing a subset of the instructions and pomters to the instructions withm instruction bytes storage 80) In the present embodiment, immediate field generation unit 73 is further configured to detect a compare instruction within a particular issue position, followed by a branch mstraction in the immediately subsequent issue position which depends upon the compare result (I e a conditional branch instruction) Upon detecting such a combination, immediate field generation unit 73 asserts a compare indication to operand collapse unit 78. In other embodiments, a separate control unit can be provided to detect the compare/branch combmation, or one of the other units may be configured to provide the functionality. Furthermore, embodiments are contemplated m which the compare/branch combination is not detected Operand collapse unit 78 may be configured to collapse the compare operation and the branch operation mto one issue position (i.e. one functional unit may perform both the compare operation and the dependent branch operation concurrently). It is noted that, m Fig. 4, certain outputs of the units shown are described as bemg pipelined down to, e g , operand collapse unit 78. This is mtended to mdicate that these outputs are generated and are conveyed with the correspondmg mstraction through the pipeline to the receivmg unit Alternatively, these outputs could be captured by the receivmg unit and associated with the correspondmg mstruction upon arπval of the mstruction therein Turning now to Fig. 5, a portion of one embodiment of lookahead address/result calculation unit 74 is illustrated Other embodiments are possible and contemplated. In the embodiment of Fig. 5, a portion of lookahead address/result calculation unit 74 correspondmg to issue position 0 (i.e. correspondmg to decode unit 70A) is illustrated. Similar hardware may be provided for the other issue positions as well A control unit 100 is shown coupled to opcode/mod R/M bus 82A pipelined down from decode unit 70A Control unit 100 is also coupled to receive valid indications corresponding to the source operands of the mstruction as provided by fumre file 26 via a bus 102 A source operand is valid m future file 26 if the source operand is provided instead of a result queue tag indicating the mstraction which will produce die source operand upon execution. Control unit 100 is coupled to provide selection controls to operand select multiplexors (muxes) 104A and 104B Operand select mux 104A is coupled to a lookahead ESP bus 88-1 (a portion of lookahead ESP/EBP bus 88 which provides the lookahead ESP value), constant bus 90A, and a source 1 bus 112 from future file 26. Operand select mux 104B is coupled to a lookahead EBP bus 88-2 (a portion of lookahead ESP/EBP bus 88 which provides the lookahead EBP value), constant bus 90A and a source 2 bus 114 from fumre file 26 An adder 106 is shown coupled to operand select muxes 104 as well as immediate field bus 94A and a segment bus 108 Adder 106 provides a result upon a result bus 110A provided to load/store unit 36, fumre file 26, and operand collapse unit 78 Control unit 100 produces an address valid signal upon an address valid lme 116A to load/store unit 36 and operand collapse unit 78 and a result valid signal upon a result valid lme 118A to fumre file 26 and operand collapse unit 78 It is noted that, as discussed above, connections listed with a reference numeral followed by a letter may be repeated for instructions m other issue positions (not shown in Fig. 5) Control unit 100 is configured to decode the opcode and mod R/M bytes of the instruction to determine whether to perform a lookahead address generation (for mstructions mcludmg a memory operand), a lookahead result generation (for mstructions excludmg a memory operand and performing an additive mstraction operation or a move instruction operation), or neither Control unit 100 may select operands via operand select muxes 104 according to a decode of the instruction Adder 106 is configured to add (I) the values provided by operand select muxes 104A and 104B, the immediate value provided upon immediate field bus 94 A, (in) and the segment base address provided upon segment bus 108 to produce the result For result generations (as opposed to address generations) the segment value may be zero or may be ignored by adder 106 responsive to a control signal from control unit 100 (not shown). For example, the truth table 120 illustrated m Fig. 6 may be employed for one embodiment of control unit 100 to select values the operand select muxes 104 if the instruction includes an address generation mstraction operation for a memory operand Truth table 120 includes an addressmg mode column indicating the addressmg mode employed by the mstruction to generate the address of the memory operand, a mux 1 column indicating the value selected by operand select mux 104 A responsive to controls from control unit 100, and a mux 2 column indicating the value selected by operand select mux 104B responsive to controls from control unit 100. Other embodiments are possible and contemplated. The embodiment illustrated m Fig 6 supports the following addressing modes: (I) displacement only; (n) combmations of an optional displacement and one or two address operands (not including the ESP or EBP registers); or (in) the ESP or EBP registers as a source operand along with an optional displacement It is noted that a scale factor may be mcluded m the scale-index-base addressmg modes specifiable m the x86 instruction set architecmre. Mux 104A may be configured to scale the source 1 operand by selectmg the source 1 operand shifted left by one or two bits. It is further noted that the displacement shown in Fig 6 is provided upon immediate bus 94A m the present embodiment Depending upon the addressmg mode specified by the mstraction, control unit 100 examines the valid indications from fumre file 26 and determines if adder 106 successfully generates the address of the memory operand In other words, if each source operand which is an address operand is valid, adder 106 may successfully generate the address If the address is successfully generated, control unit 100 asserts the address valid signal upon the address valid line 116A to indicate to load/store unit 36 that the address provided upon result bus 110A is to be captured and used as the address of the memory operand for the correspondmg mstraction If the address is not successfully generated, address generation units 34 may be used to generate the address subsequently and the address may then be forwarded to load/store unit 36 Segment bus 108 provides a segment base address according to the segmentation translation mechanism defined by the x86 instruction set architecmre Other embodiments for processors employing other mstraction set architecmres may eliminate segment bus 108. The segment base address provided on segment bus 108 is the segment base address of the selected segment correspondmg to the instruction withm the current issue position Alternatively, each available segment base address may be provided and selected accordmg to the correspondmg instruction Segment information may be maintained in an appropriate translation unit or special register unit as is well-known in the art If the instruction in the current issue position does not include a memory operand, control unit 100 may attempt to select operands to generate a lookahead result for the mstraction. In the present embodiment, control unit 100 may support an add/subtract or increment/decrement operation involving one or to source operands and/or an immediate value Control unit 100 may also support register-register moves by providmg be second source operand as the sole input to adder 106. For example, one embodiment of control unit 100 may operate accordmg to the truth table 122 illustrated m Fig 7 Other embodiments are possible contemplated Truth table 122 as shown in Fig 7 includes an arithmetic operation column indicating the arithmetic operations supported by lookahead address/result calculation unit 74 accordmg to the present embodiment. Similar to truth table 120 shown in Fig. 6, truth table 122 includes a mux 1 column indicating the operand selected by operand select mux 104A and a mux 2 column indicating the operand selected by operand select mux 104B m response to respective controls from control unit 100. According to the table, and add or subtract of one (if zero is selected through mux 104B) or two source operands and an optional immediate field may be supported as well as and mcrement or decrement and a register- register move Control unit 100 is configured to determine if adder 106 successfully produces a lookahead result upon result bus 110A. Control unit 100 determmes that a successful result has been produced if each of the source operands used to generate a result are valid as mdicated by future file 26 and the functional mstraction operation specified by the mstruction is one which is supported by lookahead address/result calculation unit 74. If the result is determined to be successfully produced, control unit 100 asserts a result valid signal upon result valid lme 118A to fumre file 26 and operand collapse unit 78. Fumre file 26 may be configured to store the result according to the destmation register of the mstraction (which may also be provided upon result bus 110A) Operand collapse unit 78 may be configured to collapse the result mto a source operand of a dependent mstruction (accordmg to dependency indications provided by mtralme dependency check unit 75). Turning next to Fig. 8, a block diagram illustrating a portion of one embodiment of operand collapse unit 78 is shown Other embodiments are possible and contemplated In the portion illustrated m Fig. 8, a control unit 130 is shown along with operand collapse muxes 132A-132D Control unit 130 is coupled to a plurality of result valid lines 118 (including result valid lme 118A shown m Fig 5), a plurality of address valid lmes 116 (mcludmg address valid line 116A shown m Fig 5), dependency bus 92 from mtralme dependency check unit 75, a plurality of compare lines 96 (including compare line 96A shown m Fig. 4) and an inhibit bus 134 Control unit 130 is further coupled to provide selection controls to each of collapse muxes 132 (as well as collapse muxes for other issue positions not shown in Fig 8) Each of collapse muxes 132A-132D corresponds to one source operand withm one issue position Each of collapse muxes 132A-132D are coupled to receive die destination tags corresponding to the prior issue positions within the lme, as well as the lookahead results corresponding to those issue positions Furthermore, each of collapse muxes 132A-132D are coupled to receive the fumre file output for the source operand of the mstraction withm the issue position immediately prior to the issue position corresponding to that collapse mux 132A-132D and the source operand of the mstraction withm the issue position corresponding to that collapse mux 132A-132D For example, collapse mux 132A provides the source 1 operand for issue position 1 and is coupled receive (I) the destmation tag for the instruction withm issue position 0, (π) the lookahead result provide upon result bus 110A corresponding to issue position 0, and (in) the source 1 operands from fumre file 26 corresponding to the source 1 operand of issue position 0 and the source 1 operand of issue position 1 As illustrated in Fig 8, the capital letter P followed by a number mdicates the issue position corresponding to the value indicated (l e P0 is issue position 0, PI is issue position 1, etc ) As described above, operand collapse unit 78 collapses the lookahead results generated by lookahead address/result calculation unit 74 into source operands of the dependent mstructions within the lme In the embodiment shown in Fig 8, an operand collapse mux 132 is provided for each source operand and each issue position for which a collapse may be performed Accordmgly, no operand collapse muxes are shown for issue position 0 because issue positions 0 is the first issue position withm the lme and hence may not experience and mtralme dependency Operand collapse muxes 132A and 132B provide the source operands for issue position 1, while operand collapse muxes 132C and 132D provide the source operands for issue position 2 Similar operand class muxes provide the source one source to operands for issue positions 3,4, and 5 (not shown m Fig 8) Control unit 130 receives indications of which results are valid via result valid lmes 118 and indications of the intralme dependencies upon dependency bus 92 If a dependency is noted for a particular source operand in a particular issue position via dependency bus 92 and the result is valid as mdicated by the result valid lme 118 for the issue position upon which the source operand is dependent, control unit 130 may control a correspondmg operand collapse mux 132 to select the result from the correspondmg lookahead result bus On the other hand, if a dependency is noted that the corresponding result is not valid, then control unit 130 may control a correspondmg operand collapse mux 132 to select the destmation tag of the issue position upon which the source operand is dependent Control unit 130 further receives the compare signals on compare lmes 96 indicating that a compare/branch has been detected If a compare/branch combmation has been detected, control unit 130 selects the fumre file output for the source operands of the previous issue position for the operand collapse muxes 132 of the issue position contammg the branch mstraction In this manner, the source operands of the compare instruction may be provided mto the issue position havmg the branch mstruction Subsequently, the receivmg functional unit can perform both the compare (usmg the compare source operands) and determine the branch instruction taken or not taken as result of the compare If no dependency is noted for a particular source operand of a particular issue position and the issue position is not die branch portion of a compare/branch combmation, control unit 130 may control the correspondmg operand collapse mux 132 to select the future file output for that source operand in that issue position (which may be a result queue tag or a valid source operand) An additional check which control unit 130 may perform is to determine, m a case m which a particular source operand in a particular issue position is indicated dependent upon a prior issue position for which a result is indicated valid by lookahead address/result calculation unit 74 If the prior issue position has an mtralme source dependency mdicated, then the result provided by lookahead address/result calculation unit 74 is actually invalid (because it is based on an incorrect source operand). In such cases, control unit 130 may inhibit selection of the lookahead result provided by lookahead address/result calculation unit 74 and mstead select the destination tag corresponding to the prior issue position. In one implementation, control yet 130 may mask the result valid signals with the corresponding dependency indications from dependency bus 92 such that the masked result valid signals are reset if a dependency is indicated within the correspondmg issue position. It is noted that fumre file 26 and load/store unit 36 may invalidate lookahead results/addresses m a similar fashion. Control unit 130 may further be configured to signal instruction wmdows 30 via inhibit bus 134. For each instruction operation completed by lookahead address/result calculation unit 74 (either address generation or functional operation) control unit 130 may inhibit the corresponding operation withm mstraction windows 30 such that the instruction operation is not selected for execution by a functional unit 32 or address generation unit 34 For example, inhibit bus 134 may include an inhibit address generation signal and an inhibit functional operation signal for each issue position. Control unit 130 may activate the inhibit address generation signal for a particular issue position if lookahead address/result calculation unit 74 successfully generated the lookahead address for that particular issue positions (including the effects of any intralme dependencies) On the other hand, control unit 130 may activate the inhibit functional operation signal if lookahead address/result calculation unit 74 successfully generated the lookahead result correspondmg to that particular issue position (mcludmg the effects of any intralme dependencies) Additionally, control unit 130 may activate the inhibit functional operation signal if the particular issue position is stormg the compare portion of a compare/branch combmation. As mentioned above, arithmetic operations may mclude a flag generation in addition to the functional operation of the arithmetic instruction Such instructions may not be inhibited to allow for the generation of the flag result even though the functional result is already generated Alternatively, the functional result may not be inhibited to provide forwardmg to instructions which may have read fumre file 26 pπor to fumre file 26 bemg updated with the lookahead result. Otherwise, local forwardmg withm the pipelme stages between readmg die future file and providing the lookahead results may be performed Control unit 130 receives the address valid signals m order to generate the inhibit address generation signals. Still further, control unit 130 may be configured not to inhibit a functional operation if the correspondmg mstruction updates the condition codes as well as a result register. The functional operation may thereby be passed to a functional unit for calculation of the condition codes. Turning next to Fig. 9, a flowchart is shown illustrating operation of one embodiment of control unit 130 for selecting a particular source operand for a particular issue position. Other embodiments are possible and contemplated. The steps shown m Fig 9 may be performed for each source operand m parallel. The steps shown m Fig. 9 are shown m a particular order for ease of understandmg, but may be performed m any suitable order Furthermore, the steps may be performed m parallel as desired m the logic withm control unit 130 Control unit 130 determmes if there is and mtralme dependency noted for the particular source operand (decision block 140) If an mtralme dependency is noted, control unit 130 determmes if lookahead address/result calculation unit 74 successfully generated a lookahead result for the pπor issue position upon which the particular source operand is dependent (decision block 142) If a lookahead result was not successfully generated, control unit 130 selects the destmation tag correspondmg to the pπor issue position (step 144) Additionally, if the result is valid within the pπor issue position but an mtralme dependency is noted for one or more of the source operands for the prior issue position (decision block 146), control unit 130 selects the destmation tag corresponding to the prior issue position as well (step 144). If there is no dependency noted for the source operands of the prior issue position and the result is valid, control yet 130 selects the result provided by lookahead address/result calculation If no intralme dependency is noted for the particular source operand (decision block 140), control unit 130 determines if a compare/branch combination has been detected for which the particular issue position is the branch portion (decision block 150) If the compare/branch combination has been detected the source operand from the precedmg issue position (i.e. the issue position contammg the compare mstraction) is selected by control unit 130 (step 152) On the other hand, if the compare/branch combination has not been detected, control unit 130 selects the fumre file output for the particular source operand (step 154). It is noted that, while various feamres are illustrated above as muxes, any parallel or serial combmation of selection logic may be used to perform the described selections. It is further noted that, while the present embodiment provides collapse for mtralme results and compare/branch combmation, embodiments which provide only one of these feamres are also contemplated. It is still further noted that, while a fumre file is used as a source for operands m the present embodiment, other embodiments may employ other speculative storage elements such as reorder buffers, rename register files, etc as a source for operands. Turning now to Fig. 10, a block diagram of one embodiment of a computer system 200 mcludmg processor 10 coupled to a vaπety of system components through a bus bridge 202 is shown Other embodiments are possible and contemplated In the depicted system, a mam memory 204 is coupled to bus bridge 202 through a memory bus 206, and a graphics controller 208 is coupled to bus bridge 202 through an AGP bus 210. Finally, a plurality of PCI devices 212A-212B are coupled to bus bridge 202 through a PCI bus 214 A secondary bus bridge 216 may further be provided to accommodate an electrical mterface to one or more EISA or ISA devices 218 through an EISA/ISA bus 220. Processor 10 is coupled to bus bπdge 202 through bus mterface 46. Bus bridge 202 provides an interface between processor 10, mam memory 204, graphics controller 208, and devices attached to PCI bus 214 When an operation is received from one of the devices connected to bus bridge 202, bus bridge 202 identifies the target of the operation (e.g. a particular device or, m the case of PCI bus 214, that the target is on PCI bus 214) Bus bridge 202 routes the operation to the targeted device. Bus bπdge 202 generally translates an operation from the protocol used by the source device or bus to the protocol used by the target device or bus In addition to providmg an interface to an ISA/EISA bus for PCI bus 214, secondary bus bridge 216 may further incorporate additional functionality, as desired. For example, m one embodiment, secondary bus bπdge 216 includes a master PCI arbiter (not shown) for arbitrating ownership of PCI bus 214. An input/output controller (not shown), either external from or mtegrated with secondary bus bridge 216, may also be mcluded within computer system 200 to provide operational support for a keyboard and mouse 222 and for vaπous serial and parallel ports, as desired. An external cache unit (not shown) may further be coupled to bus mterface 46 between processor 10 and bus bridge 202 m other embodiments. Alternatively, the external cache may be coupled to bus bridge 202 and cache control logic for the external cache may be integrated mto bus bridge 202. Mam memory 204 is a memory in which application programs are stored and from which processor 10 primarily executes. A suitable mam memory 204 comprises DRAM (Dynamic Random Access Memory), and preferably a plurality of banks of SDRAM (Synchronous DRAM) PCI devices 212A-212B are illustrative of a variety of peripheral devices such as, for example, network mterface cards, video accelerators, audio cards, hard or floppy disk drives or drive controllers, SCSI (Small Computer Systems Interface) adapters and telephony cards Similarly, ISA device 218 is illustrative of various types of peripheral devices, such as a modem, a sound card, and a vaπety of data acquisition cards such as GPIB or field bus mterface cards Graphics controller 208 is provided to control the rendermg of text and images on a display 226. Graphics controller 208 may embody a typical graphics accelerator generally known m the art to render three- dimensional data structures which can be effectively shifted mto and from main memory 204. Graphics controller 208 may therefore be a master of AGP bus 210 m that it can request and receive access to a target interface within bus bridge 202 to thereby obtam access to mam memory 204. A dedicated graphics bus accommodates rapid retrieval of data from mam memory 204. For certain operations, graphics controller 208 may further be configured to generate PCI protocol transactions on AGP bus 210 The AGP mterface of bus bridge 202 may thus mclude functionality to support both AGP protocol transactions as well as PCI protocol target and initiator transactions Display 226 is any electronic display upon which an image or text can be presented A suitable display 226 includes a cathode ray tube ("CRT"), a liquid crystal display ("LCD"), etc It is noted that, while the AGP, PCI, and ISA or EISA buses have been used as examples m the above description, any bus architecmres may be substituted as desired. It is further noted that computer system 200 may be a multiprocessing computer system mcludmg additional processors (e.g. processor 10a shown as an optional component of computer system 200). Processor 10a may be similar to processor 10. More particularly, processor 10a may be an identical copy of processor 10. Processor 10a may share bus mterface 46 with processor 10 (as shown m Fig. 10) or may be connected to bus bπdge 202 via an mdependent bus In accordance with the above disclosure, a processor has been shown which attempts to generate lookahead addresses and/or results prior to execution of the instructions Intralme dependencies are noted, and the lookahead results are collapsed mto source operands of the dependent mstructions. Forwardmg may be more efficient by providmg die lookahead results early (providmg forwardmg via a future file and die collapse mechanism) Furthermore, fewer functional units may be supported by requiring fewer mstraction operations to be executed m the functional units. Numerous variations and modifications will become apparent to those skilled m the art once the above disclosure is fully appreciated It is intended that the following claims be interpreted to embrace all such variations and modifications

Claims: WHAT IS CLAIMED IS: 1 A processor compπsmg an intraline dependency check unit coupled to receive a plurality of operand specifiers coπesponding to a line of instructions, wherem said mtralme dependency check unit is configured to determine dependencies between instructions within said lme of instructions by comparing said plurality of operand specifiers, a lookahead calculation unit coupled to receive one or more operands specified by said plurality of operand specifiers, wherem said lookahead calculation unit is configured to calculate a lookahead result coπesponding to a first mstraction withm said line of instructions if each operand used by said first instruction to generate said lookahead result are withm said one or more operands, an operand collapse unit coupled to said lookahead calculation unit and said intralme dependency check unit, wherem said operand collapse unit is configured to provide said lookahead result as an operand of a second instruction withm said lme of mstructions responsive to (l) an indication from said lookahead calculation unit that said lookahead result is valid, and (u) an indication from said mtralme dependency check unit that said second mstraction is dependent upon said first instruction, and one or more mstruction windows coupled to said operand collapse unit, wherem said one or more instruction windows are configured to store mstructions until coπespondmg operands are provided and to subsequently select said instructions for execution, wherem said operand collapse unit is configured to signal said one or more mstructions wmdows to inhibit execution of at least a first mstraction operation of said first mstraction represented by said lookahead result if said lookahead result is valid 2 The processor as recited m claim 1 wherein said lookahead calculation unit is configured to calculate said lookahead result if said instruction is a move mstraction having only register operands, and wherem said move instruction comprises said first mstraction operation inhibited from said one or more mstraction wmdows 3 The processor as recited m claim 1 wherem said lookahead calculation unit is configured to calculate said lookahead result if said instruction is an additive mstraction havmg only register source operands 4 The processor as recited in claim 3 wherem said additive mstraction is provided to said one or more mstraction windows for subsequent execution to produce a flags result, and wherem said first mstruction operation comprises said additive operation 5 The processor as recited in claim 3 wherem said lookahead calculation unit is configured to calculate a lookahead address if said first instruction includes a memory operand and said one or more operands include one or more address operands coπesponding to said first mstraction, and wherem said first mstraction operation comprises said address generation 6 The processor as recited m claim 3 further comprising a load/store unit coupled to said lookahead calculation unit, wherein said load/store unit is configured to receive said lookahead address as an address of said memory operand responsive to an indication from said lookahead calculation unit that said lookahead address is valid, and wherem said operand collapse unit is configured to disable an address generation coπespondmg to said first instruction upon providing said line of instructions to said one or more mstraction windows 7 The processor as recited m claim 6 further comprismg an address generation unit coupled to said one or more instruction windows, wherem said address generation unit is configured to generate said address if said lookahead address is invalid 8 The processor as recited in claim 1 further comprismg a functional unit coupled to said one or more instruction windows, wherein said functional unit is configured to execute instructions provided diereto by said one or more instruction windows 9 The processor as recited m claim 8 wherem said functional unit does not execute said portion of said first instruction represented by said lookahead result if said lookahead result is valid 10 The processor as recited m claim 9 further comprismg a fumre file coupled to said lookahead calculation unit, wherem said fumre file is configured to provide said one or more operands to said lookahead calculation unit responsive to said plurality of operand specifiers 11 The processor as recited m claim 10 wherem said fumre file is coupled to receive said lookahead result and to update a destmation operand coπespondmg to said lookahead result in response thereto 12 The processor as recited m claim 11 wherem said fumre file is coupled to said functional unit, wherem said future file is configured to update said destination operand coπespondmg to an execution result provided therefrom 13 The processor as recited m claim 1 wherem said operand collapse unit is configured to provide operands coπespondmg to said first mstraction as operands of said second mstraction if said first instruction is a compare instruction, said second instruction is a conditional branch mstruction, and said second instruction is consecutive to said first instruction 14 The processor as recited m claim 1, wherein said operand collapse unit is further configured to inhibit said one or more instruction windows from receiving said compare mstraction 15 A processor comprising an operand collapse unit coupled to receive a plurality of operands coπespondmg to a lme of mstructions, wherem said operand collapse unit is configured to provide one or more of said plurality of operands coπespondmg to a first mstruction within said lme of mstructions as operands of a second instruction withm said line of instructions responsive to (I) said first mstraction being a compare instruction, (n) said second mstraction bemg a conditional branch mstraction, and (m) said second mstruction bemg consecutive to said first mstraction, and one or more mstruction wmdows coupled to said operand collapse unit, wherem said one or more instruction wmdows are configured to store instructions until coπespondmg operands are provided and to subsequently select said instructions for execution, wherem said operand collapse unit is configured to signal said one or more mstructions wmdows to inhibit receipt of said first instruction if (I) said first instruction bemg a compare mstruction, (π) said second instruction bemg a conditional branch instruction, and (in) said second mstruction bemg consecutive to said first instruction 16 A method for executing a line of mstructions in a processor, the method compπsmg decoding said lme of mstructions to detect a plurality of operand specifiers, comparing destmation operand specifiers of each mstraction withm said lme of mstructions to source operand specifiers of each subsequent mstraction withm said lme of mstructions to detect mtralme dependencies, reading a speculative operand source to capture source operands specified by said source operand specifiers, calculating a lookahead result for a first mstraction withm said lme if said source operands are available m said speculative operand source, signalling an instruction window configured to receive said first instruction to inhibit execution of at least a first mstraction operation of said first mstruction which produces said lookahead result if said lookahead result is successfully calculated, and providing said lookahead result to a second instruction withm said line of mstructions if said comparmg indicates a dependency of said second instruction upon said first mstraction, said providmg performed prior to storing said second instruction in said instruction window 17 The method as recited in claim 16 further comprismg selecting said second mstruction from said mstraction window for execution 18 The method as recited m claim 16 wherem said calculating is successful if said instruction is an additive instruction having only register operands and each of said register operands is available m said speculative operand storage upon said readmg 19 The method as recited m claim 18 further comprismg calculatmg a lookahead address if said first mstraction includes a memory operand and address operands coπespondmg to said first instruction are available m said speculative operand source upon said reading 20 A computer system comprismg a processor mcludmg an alignment unit configured to align a lme of mstructions to a plurality of issue positions, a speculative operand source configured to store speculative operands, an instruction wmdow configured to store mstructions until operands are provided for those instructions, and a lookahead/collapse unit coupled to said speculative operand source, said mstraction wmdow, and said alignment unit, wherem said lookahead/collapse unit is configure to read operands from said speculative operand source responsive to said lme of mstructions received from said alignment unit, and wherem said lookahead/collapse unit is configured to generate a lookahead result coπespondmg to a first mstraction withm said lme of mstructions responsive to said operands, and wherem said lookahead/collapse unit is further configured to update said speculative operand source with said lookahead result, and wherem said lookahead/collapse unit is configured to forward said lookahead result to a second mstraction withm said lme of mstructions which is dependent upon said first mstraction, and wherem said lookahead collapse unit is configured to signal said instruction wmdow to inhibit execution of at least a first mstraction operation of said first mstruction which produces said lookahead result, and an input/output (I/O) device coupled to said processor, wherem said I/O device is configured to communicate between said computer system and another computer system to which said I/O device is coupled 21 The computer system as recited m claim 1 further comprismg a second processor mcludmg an alignment unit configured to align a line of instructions to a plurality of issue positions, a speculative operand source configured to store speculative operands, an mstraction window configured to store instructions until operands are provided for those mstractions, and a lookahead/collapse unit coupled to said speculative operand source, said instruction wmdow, and said alignment unit, wherein said lookahead/collapse unit is configure to read operands from said speculative operand source responsive to said line of mstractions received from said alignment unit, and wherem said lookahead/collapse unit is configured to generate a lookahead result coπespondmg to a first mstraction withm said line of instructions responsive to said operands, and wherem said lookahead/collapse unit is further configured to update said speculative operand source with said lookahead result, and wherem said lookahead/collapse unit is configured to forward said lookahead result to a second mstraction withm said lme of instructions which is dependent upon said first instruction, and wherem said lookahead/collapse unit is configured to signal said instruction wmdow to inhibit execution of at least a first instruction operation of said first instruction which produces said lookahead result

Inventors: WITT DAVID B, WITT, DAVID, B.
Applicants: ADVANCED MICRO DEVICES INC, ADVANCED MICRO DEVICES, INC.
Application year: 1998
Main classification: G06F7
IPC codes: G06F9, G06F12