Claims
- 1. Apparatus for prefetching instructions for execution, comprising:
- a history based branch prediction table for storing information about previously executed segments of sequentially addressed instructions, said segments terminating with a taken branch instruction;
- said table storing for each of said segments a target address for said each segment, said target address being an address of a next executed instruction following said each segment when said each segment was previously executed;
- said table also storing for said each segment, an address tag identifying a first instruction of said each segment and information to determine a length of said each segment, said length being variable from segment to segment;
- means for holding in an instruction buffer a prefetched sequence of instructions for execution, said prefetched sequence including a last instruction having a last instruction address;
- address comparing means for comparing said last instruction address to said address tags stored in said table in order to detect a matching address tag stored in said table; and
- prefetching means responsive to detection of a matching address tag in said table for prefetching storage said segment of instructions identified by said matching address tag, adding said prefetched segment to said prefetched sequence, and making said target address of said prefetched segment said last instruction address of said prefetched sequence.
- 2. Apparatus as defined in claim 1 wherein at least some of said address tags stored in said table correspond to a target address stored in said table.
- 3. Apparatus as defined in claim 2 wherein all of said address tags stored in said table correspond to a target address stored in said table.
- 4. Apparatus as defined in claim 1 wherein some of said segments terminating with a taken branch instruction include at least one additional branch instruction in addition to said terminating taken branch instruction.
- 5. Apparatus as defined in claim 4 wherein said additional branch instructions were not taken when said segments containing said additional branch instructions were previously executed.
- 6. Apparatus as defined in claim 1 wherein at least some of said segments have a size corresponding to at least three instructions.
- 7. Apparatus as defined in claim 1 wherein each said segment terminating with a taken branch instruction has for a stored target address a target address of said each taken branch instruction.
- 8. Apparatus as defined in claim 7 wherein all of said segments terminate with a taken branch instruction.
Parent Case Info
This is a continuation of application Ser. No. 07/860,631, filed Mar. 30, 1992, now abandoned.
US Referenced Citations (6)
Continuations (1)
|
Number |
Date |
Country |
Parent |
860631 |
Mar 1992 |
|