Claims
- 1. A method, comprising:
introducing a plurality of instructions into respective stages in a multistage processing pipeline; and prohibiting execution of only those one or more instructions already in the pipeline that should be skipped to effect a forward branch.
- 2. The method of claim 1, wherein the effective forward branch is achieved without modifying a program counter of the processing pipeline.
- 3. The method of claim 1, wherein the effective forward branch is achieved without re-introducing instructions into the pipeline that were previously nullified.
- 4. A method, comprising:
decoding a skip instruction in a first cycle of a processing pipeline to obtain at least an offset value, the offset value representing a potential number of subsequent instructions in the processing pipeline that are to be skipped; executing the skip instruction in a second cycle of the processing pipeline to determine whether a specified condition of the skip instruction indicates that the number of instructions represented by the offset value should be skipped; using the offset value to establish a count value; and prohibiting execution of subsequent instructions in the processing pipeline when (i) the specified condition value indicates that such instructions should be skipped, and (ii) the count value differs from a steady state value.
- 5. The method of claim 4, further comprising permitting execution of subsequent instructions in the processing pipeline when at least one of (i) the specified condition indicates that such instructions should not be skipped, and (ii) the count value equals the steady state value.
- 6. The method of claim 4, further comprising incrementing or decrementing the count value in one or more cycles of the processing pipeline until the count value equals the steady state value.
- 7. The method of claim 6, wherein:
the step of using the offset value to establish the count value includes setting the count value equal to the offset value; the count value is decremented in the one or more cycles of the processing pipeline; and the steady state value is zero.
- 8. The method of claim 6, wherein the count value is incremented or decremented in a given cycle by an amount proportional to a number of the subsequent instructions that are prohibited from being executed in that cycle.
- 9. The method of claim 8, wherein:
the step of using the offset value to establish the count value includes setting the count value equal to the offset value; the count value is decremented in the given cycle by the number of the subsequent instructions that are prohibited from being executed in that cycle; and the steady state value is zero.
- 10. The method of claim 4, wherein the step of prohibiting execution of the subsequent instructions in the processing pipeline effects a forward branch in the instructions of the processing pipeline without modifying a program counter of the processing pipeline.
- 11. The method of claim 4, wherein the step of prohibiting execution of the subsequent instructions in the processing pipeline effects a forward branch in the instructions of the processing pipeline by nullifying only those instructions already in the pipeline that should be skipped.
- 12. The method of claim 11, wherein the effective forward branch is achieved without re-introducing instructions into the pipeline that were previously nullified.
- 13. The method of claim 4, further comprising determining whether a branch instruction is a skip instruction by (i) determining whether the branch instruction includes a forward offset value; and (ii) determining whether the forward offset value is less than or equal to a threshold value.
- 14. An apparatus, comprising:
an instruction decoding unit operable to decode a skip instruction in a first cycle of a processing pipeline to obtain at least an offset value, the offset value representing a potential number of subsequent instructions in the processing pipeline that are to be skipped; a skip instruction unit operable to execute the skip instruction in a second cycle of the processing pipeline to determine whether a specified condition of the skip instruction indicates that the number of instructions represented by the offset value should be skipped and to set an instruction skip signal to a value indicative of the determination; and an instruction skip counter operable to (a) receive the offset value and to use it to establish a count value, and (b) produce an instruction nullifying signal indicating that execution of subsequent instructions in the processing pipeline should be prohibited when (i) the value of the instruction skip signal indicates that such instructions should be skipped, and (ii) the count value differs from a steady state value.
- 15. The apparatus of claim 14, wherein the instruction skip counter is further operable to produce the instruction nullifying signal such that it indicates that execution of subsequent instructions in the processing pipeline should be executed when at least one of (i) the value of the instruction skip signal indicates that such instructions should not be skipped, and (ii) the count value equals the steady state value.
- 16. The apparatus of claim 14, wherein the skip instruction counter is further operable to increment or decrement the count value in one or more cycles of the processing pipeline until the count value equals the steady state value.
- 17. The apparatus of claim 16, wherein:
the skip instruction counter is further operable to set the count value equal to the offset value, and to decrement the count value in the one or more cycles of the processing pipeline; and the steady state value is zero.
- 18. The apparatus of claim 16, wherein the skip instruction counter is further operable to increment or decrement the count value in a given cycle of the processing pipeline by an amount proportional to a number of the subsequent instructions that are prohibited from being executed in that cycle.
- 19. The method of claim 18, wherein:
the skip instruction counter is further operable to set the count value equal to the offset value, and to decrement the count value in the given cycle by the number of the subsequent instructions that are prohibited from being executed in that cycle; and the steady state value is zero.
- 20. The method of claim 14, further comprising an instruction execution unit operable to execute instructions, other than the skip instructions, and to prohibit execution of such instructions in accordance with the instruction nullifying signal.
- 21. The apparatus of claim 14, wherein the prohibiting of execution of the subsequent instructions in the processing pipeline effects a forward branch in the instructions of the processing pipeline without modifying a program counter of the processing pipeline.
- 22. The apparatus of claim 14, wherein the prohibiting of execution of the subsequent instructions in the processing pipeline effects a forward branch in the instructions of the processing pipeline by nullifying only those instructions already in the pipeline that should be skipped.
- 23. The apparatus of claim 22, wherein the effective forward branch is achieved without re-introducing instructions into the pipeline that were previously nullified.
- 24. The apparatus of claim 14, wherein the skip instruction unit is further operable to determining whether the specified condition is one of true or false when determining whether the number of instructions represented by the offset value should be skipped.
- 25. The apparatus of claim 14, wherein at least one of the skip instruction unit and the instruction decoding unit is further operable to determine whether a branch instruction is a skip instruction by (i) determining whether the branch instruction includes a forward offset value; and (ii) determining whether the forward offset value is less than or equal to a threshold value.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims the benefits of U.S. Provisional Patent Application No. 60/366,509, filed Mar. 21, 2002, entitled METHODS AND APPARATUS FOR PROCESSING BRANCH INSTRUCTIONS, the entire disclosure of which is hereby incorporated by reference.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60366509 |
Mar 2002 |
US |