Claims
- 1. A method of operating a processor, the method comprising:
fetching a plurality of instructions; detecting that one of the fetched instructions will, when executed, result in a register window boundary condition; and forwarding a set of helper instructions prior to forwarding the detected instruction to avoid the register window boundary condition when the one of the detected of instruction is executed.
- 2. The method of claim 1, further comprising:
determining whether to resolve the register window boundary condition with the set of helper instructions or by generating a trap and calling a trap handler routine.
- 3. The method of claim 1, wherein the detecting comprises:
identifying a register window manipulation instruction in the plurality of instructions; and determining a state of window management registers to determine if the register window manipulation instruction will, when executed, result in a register window boundary condition.
- 4. The method of claim 3, wherein the register manipulation instruction is one of a save instruction, a return instruction, and a restore instruction.
- 5. The method of claim 1, wherein the register window boundary condition is a register window underflow condition requiring one or more register windows to be filled.
- 6. The method of claim 1, wherein the register window boundary condition is a register window overflow condition requiring one or more register windows to be spilled.
- 7. The method of claim 1, wherein the set of helper instructions is organized as one or more groups of helper instructions and wherein a register identifies an address in a helper store of an initial group of the one or more groups, the register corresponding to the register window boundary condition.
- 8. The method of claim 1, wherein the set of helper instructions is organized as one or more groups of instructions, each of the one or more groups having three instructions.
- 9. The method of claim 1, wherein the set of helper instructions is organized as one or more groups of instructions, each of the one or more groups having N helper instructions, wherein N is a number of instructions that can be fetched in one cycle by the processor.
- 10. A processor comprising:
instruction fetch logic configured to fetch a plurality of instructions; boundary condition logic configured to detect that one of the fetched instructions will, when executed, result in a register window boundary condition; and helper logic configured to forward a set of helper instructions prior to forwarding a detected instruction to avoid the register window boundary condition from occurring when the detected instruction is executed.
- 11. The processor of 10, further comprising:
a register that identifies whether to resolve the register window boundary condition with the set of helper instructions or by generating a trap and calling a trap handler routine.
- 12. The processor of 10, wherein the boundary condition logic comprises:
logic to identify a register window manipulation instruction in the plurality of instructions; and logic to compare a state of window management registers to determine if the register window manipulation instruction will, when executed, result in a register window boundary condition.
- 13. The processor of 12, wherein the register manipulation instruction is one of a save instruction, a restore instruction, and a return instruction.
- 14. The processor of 10, wherein the register window boundary condition is a register window underflow condition requiring one or more register windows to be filled.
- 15. The processor of 10, wherein the register window boundary condition is a register window overflow condition requiring one or more register windows to be spilled.
- 16. The processor of 10, wherein the set of helper instructions is organized as one or more groups of instructions, the processor further comprising a register that identifies an address in a helper store of an initial one of the one or more groups, the register corresponding to the register window boundary condition.
- 17. The processor of 10, wherein the set of helper instructions is organized as one or more groups of instructions, each of the one or more groups having three instructions.
- 18. The processor of 10, wherein the set of helper instructions is organized as one or more groups of instructions, each of the one or more groups having N helper instructions, wherein N is a number of instructions that can be fetched in one cycle by the processor.
- 19. A processor that detects a fetched instruction that will, when executed, cause a register window boundary condition and avoids the register window boundary condition by forwarding for execution a set of helper instructions prior to forwarding for execution the fetched instruction.
- 20. A processor that detects a fetched instruction that will, when executed, cause a trap condition and avoids the trap condition by forwarding a set of helper instructions prior to forwarding the fetched instruction.
- 21. An apparatus comprising:
means for fetching a plurality of instructions; means for detecting that one of the fetched instructions will, when executed, result in a register window boundary condition; and means for forwarding a set of helper instructions prior to forwarding a detected instruction to avoid the register window boundary condition when the one of the detected of instruction is executed.
- 22. The apparatus of claim 21, further comprising:
means for determining whether to resolve the register window boundary condition with the set of helper instructions or by generating a trap and calling a trap handler routine.
- 23. The apparatus of claim 21, wherein the means for detecting comprises:
means for identifying a register window manipulation instruction in the plurality of instructions; and means for determining a state of window management registers to determine if the register window manipulation instruction will, when executed, result in a register window boundary condition.
- 24. The apparatus of claim 23, wherein the register manipulation instruction is one of a save instruction, a return instruction, and a restore instruction.
- 25. The apparatus of claim 21, wherein the register window boundary condition is a register window underflow condition requiring one or more register windows to be filled.
- 26. The apparatus of claim 21, wherein the register window boundary condition is a register window overflow condition requiring one or more register windows to be spilled.
- 27. The apparatus of claim 21, wherein the set of helper instructions is organized as one or more groups of helper instructions and wherein a register identifies an address in a helper store of an initial group of the one or more groups, the register corresponding to the register window boundary condition.
- 28. The apparatus of claim 21, wherein the set of helper instructions is organized as one or more groups of instructions, each of the one or more groups having three instructions.
- 29. The apparatus of claim 21, wherein the set of helper instructions is organized as one or more groups of instructions, each of the one or more groups having N helper instructions, wherein N is a number of instructions that can be fetched in one cycle by the processor.
CROSS-REFERENCE TO RELATED APPLICATION(S)
[0001] The present application is related to U.S. patent application No. ______ {Attorney Docket No. 004-8634}, entitled “Helper Logic for Complex Instructions” filed on Mar. 31, 2003 having Chandra M. R. Thimmannagari, Sorin Iacobovici and Rabin Sugumar as inventors, U.S. patent application Ser. No. 10/165,256 {Attorney Docket No. 004-7350}, entitled “Register Window Fill Technique for Retirement Window Having Entry Size Less Than Amount of Fill Instructions” filed on Jun. 7, 2002 having Chandra M. R. Thimmannagari, Rabin Sugumar, Sorin Iacobovici, and Robert Nuckolls as inventors, and U.S. patent application Ser. No. 10/165,268 {Attorney Docket No. 004-7351}, entitled “Register Window Spill Technique for Retirement Window Having Entry Size Less Than Amount of Spill Instructions” filed on Jun. 7, 2002 having Chandra M. R. Thimmannagari, Rabin Sugumar, Sorin Iacobovici, and Robert Nuckolls as inventors. All of these applications are assigned Sun Microsystems, Inc., the assignee of the present invention, and are hereby incorporated by reference.