Claims
- 1. A computer readable medium containing executable instructions which, when executed in a processing system, causes the system to prefetch instructions into a cache memory, comprising:a branch predict instruction for predicting a branch and prefetching an instruction of a predicted path from said branch; a prefetch instruction for prefetching an instruction of an unpredicted path from said branch, said prefetch instruction does not include a branch instruction address and branch prediction information, said prefetch instruction comprising: a target field for specifying an address at which prefetching begins; a count field for specifying a number of instructions to prefetch; a cache level field for specifying a level of cache into which the instructions are to be stored; a trace field for, establishing a trace vector; and a flush field for indicating whether earlier prefetches are to be discarded and whether in-progress prefetches are to be aborted; wherein said branch predict instruction and said prefetch instruction are separately emitted by a compiler, said branch predict instruction and said prefetch instruction are inserted into a programmed sequence of instructions, said branch predict instruction and said prefetch instruction do not change an architectural state of a processor, said branch predict instruction and said prefetch instruction pass static information from said compiler to said processor.
- 2. The computer readable medium of claim 1, wherein:said branch predict instruction prefetches instructions that comprise a loop; and said prefetch instruction prefetches instructions that execute when said loop terminates.
- 3. The computer readable medium of claim 1, wherein said branch predict instruction and said prefetch instruction are treated as no-operation (NOP) instructions.
- 4. The computer readable medium of claim 1, wherein said cache level field specifies a cache that is on the same die as a processor.
- 5. The computer readable medium of claim 1, wherein said cache level field specifies an instruction cache.
- 6. The computer readable medium of claim 1, wherein said cache level field specifies a cache on a system board.
- 7. The computer readable medium of claim 1, wherein said cache level field specifies a combined instruction/data cache.
- 8. The computer readable medium of claim 1, wherein said trace vector is encoded as a 3-bit field.
- 9. The computer readable medium of claim 8, wherein said 3-bit field comprises a “don't care” bit.
- 10. The computer readable medium of claim 1, wherein said trace field only applies to prefetch requests initiated by said prefetch instruction.
- 11. A computer readable medium containing executable instructions which, when executed in a processing system, causes the system to prefetch instructions into a cache memory, comprising:a branch predict instruction for predicting a branch instruction and for prefetching an instruction along a predicted path from said branch instruction to a first cache having a first level; a prefetch instruction for prefetching an instruction along an unpredicted path from said branch instruction to a second cache having a second level, said prefetch instruction does not include a branch instruction address and branch prediction information, said prefetch instruction comprising: a target field for specifying an address at which prefetching begins; a count field for specifying a number of instructions to prefetch; a cache level field for specifying a level of cache into which the instructions are to be stored; a trace field for establishing a trace vector; and a flush field; wherein said branch predict instruction and said prefetch instruction are separately emitted by a compiler, said branch predict instruction and said prefetch instruction are inserted into a programmed sequence of instructions, said branch predict instruction and said prefetch instruction fail to change an architectural state of a processor, said branch predict instruction and said prefetch instruction pass static information from said compiler to said processor.
- 12. The computer readable medium of claim 11, wherein:said branch predict instruction prefetches instructions that comprise a loop; and said prefetch instruction prefetches instructions that execute when said loop terminates.
- 13. The computer readable medium of claim 11, wherein said branch predict instruction and said prefetch instruction are treated as no-operation (NOP) instructions.
- 14. The computer readable medium of claim 13, wherein said cache level field specifies a cache that is on the same die as a processor.
- 15. The computer readable medium of claim 13, wherein said cache level field specifies an instruction cache.
- 16. The computer readable medium of claim 13, wherein said cache level field specifies a cache on a system board.
- 17. The computer readable medium of claim 13, wherein said cache level field specifies a combined instruction/data cache.
- 18. The computer readable medium of claim 13, wherein said flush field for indicating whether earlier prefetches are to be discarded and whether in-progress prefetches are to be aborted.
- 19. The computer readable medium of claim 18, wherein said second cache has a latency that is greater than a latency of said first cache.
- 20. The computer readable medium of claim 19, wherein said trace field only applies to prefetch requests initiated by said prefetch instruction.
CROSS REFERENCE TO RELATED APPLICATION
The present invention contains subject matter related to U.S. Pat. No. 5,742,804 to Yeh et al., which is entitled “Instruction Prefetch Mechanism Utilizing a Branch Predict Instruction”. This patent is hereby incorporated by reference.
US Referenced Citations (10)
Foreign Referenced Citations (2)
Number |
Date |
Country |
0 810517 |
Dec 1997 |
EP |
WO 9736234 |
Oct 1997 |
WO |