Claims
- 1. In a processor including a register stack, the register stack including a plurality of register stack frames, each of the register stack frames including zero or more registers, one of the plurality of register stack frames comprising a current register stack frame, a method comprising steps of:
(A) receiving an instruction whose execution requires writing to a register referenced by the instruction; (B) determining whether the register referenced by the instruction is in the current register stack frame; and (C) executing the instruction only if the register is determined to be in the current register stack frame.
- 2. The method of claim 1, wherein the step (B) comprises steps of:
(B)(1) comparing a register identifier of the register with a size of the current register stack frame; and (B)(2) determining whether the register is in the current register stack frame based on the comparison.
- 3. The method of claim 2, wherein the register identifier comprises a numerical identifier, and wherein the step (B)(2) comprises a step of determining that the register is not in the current register stack frame if the register identifier is greater than or equal to the size of the current register stack frame.
- 4. The method of claim 1, wherein the step (C) comprises steps of:
(C)(1) executing the instruction if the register is determined to be in the current register stack frame; and (C)(2) generating a fault if the register is determined not to be in the current register stack frame.
- 5. The method of claim 4, wherein the step (C)(2) comprises a step of generating an illegal operation fault if the register is determined not to be in the current register stack frame.
- 6. The method of claim 1, wherein the instruction is one of a plurality of instructions comprising a computer program executing on the processor, and wherein the step (C) comprises steps of:
(C)(1) executing the instruction if the register is determined to be in the current register stack frame; and (C)(2) halting execution of the program if the register is determined not to be in the current register stack frame.
- 7. In a processor including a register stack, the register stack including a plurality of register stack frames, each of the register stack frames including zero or more registers, one of the plurality of register stack frames comprising a current register stack frame, a method comprising steps of:
(A) receiving an instruction whose execution requires reading from a register identified by a logical register identifier, the logical register identifier identifying a register that is not within the current register stack frame; (B) determining a physical register identifier of a register in the register stack based on the logical register identifier; and (C) executing the instruction using the physical register identifier.
- 8. The method of claim 7, wherein the step (C) comprises a step of executing the instruction using the physical register identifier without generating a fault.
- 9. The method of claim 7, wherein the logical register identifier indicates a logical register number of the register, and wherein the step (B) comprises steps of:
(B)(1) determining a difference between the logical register number and a logical register number of a register at a bottom of the current register stack frame; (B)(2) adding the difference to a physical register number of the register at the bottom of the current register stack frame to determine a sum; and (B)(3) generating the physical register number based on the sum.
- 10. The method of claim 9, wherein the step (B)(3) comprises a step of:
(B)(3)(a) performing modulus division of a size of the register stack by the sum to determine a remainder; and (B)(3)(b) assigning the remainder to the physical register number.
- 11. In a processor including a register stack, the register stack including a plurality of register stack frames, each of the register stack frames including zero or more registers, one of the plurality of register stack frames comprising a current register stack frame, an apparatus comprising:
means for receiving an instruction whose execution requires writing to a register referenced by the instruction; means for determining whether the register referenced by the instruction is in the current register stack frame; and means for executing the instruction only if the register is determined to be in the current register stack frame.
- 12. The apparatus of claim 11, wherein the means for determining comprises:
means for comparing a register identifier of the register with a size of the current register stack frame; and means for determining whether the register is in the current register stack frame based on the comparison.
- 13. The apparatus of claim 12, wherein the register identifier comprises a numerical identifier, and wherein the means for determining whether the register is in the current register stack frame based on the comparison comprises means for determining that the register is not in the current register stack frame if the register identifier is greater than or equal to the size of the current register stack frame.
- 14. The apparatus of claim 11, wherein the means for executing comprises:
means for executing the instruction if the register is determined to be in the current register stack frame; and means for generating a fault if the register is determined not to be in the current register stack frame.
- 15. The apparatus of claim 14, wherein the means for generating comprises means for generating an illegal operation fault if the register is determined not to be in the current register stack frame.
- 16. The apparatus of claim 11, wherein the instruction is one of a plurality of instructions comprising a computer program executing on the processor, and wherein the means for executing comprises:
means for executing the instruction if the register is determined to be in the current register stack frame; and means for halting execution of the program if the register is determined not to be in the current register stack frame.
- 17. In a processor including a register stack, the register stack including a plurality of register stack frames, each of the register stack frames including zero or more registers, one of the plurality of register stack frames comprising a current register stack frame, an apparatus comprising:
means for receiving an instruction whose execution requires reading from a register identified by a logical register identifier, the logical register identifier identifying a register that is not within the current register stack frame; means for determining a physical register identifier of a register in the register stack based on the logical register identifier; and
means for executing the instruction using the physical register identifier.
- 18. The apparatus of claim 17, wherein the means for executing comprises means for executing the instruction using the physical register identifier without generating a fault.
- 19. The apparatus of claim 17, wherein the logical register identifier indicates a logical register number of the register, and wherein the means for determining comprises:
means for determining a difference between the logical register number and a logical register number of a register at a bottom of the current register stack frame; means for adding the difference to a physical register number of the register at the bottom of the current register stack frame to determine a sum; and
means for generating the physical register number based on the sum.
- 20. The apparatus of claim 19, wherein the means for generating comprises:
means for performing modulus division of the sum by the size of the register stack to determine a remainder; and means for assigning the remainder to the physical register number.
- 21. A processor comprising:
a register stack including a plurality of register stack frames, each of the register stack frames including zero or more registers, one of the plurality of register stack frames comprising a current register stack frame, and an instruction execution unit having an input to receive an instruction whose execution requires writing to a register referenced by the instruction, wherein the instruction execution unit is adapted to determine whether the register referenced by the instruction is in the current register stack frame and to execute the instruction only if the register is determined to be in the current register stack frame.
- 22. The processor of claim 21, wherein the instruction execution unit is adapted to compare a register identifier of the register with a size of the current register stack frame, and to determine whether the register is in the current register stack frame based on the comparison.
- 23. The processor of claim 22, wherein the register identifier comprises a numerical identifier, and wherein the instruction execution unit is adapted to determine that the register is not in the current register stack frame if the register identifier is greater than or equal to the size of the current register stack frame.
- 24. The processor of claim 21, wherein the instruction execution unit is adapted to execute the instruction if the register is determined to be in the current register stack frame, and to generate a fault if the register is determined not to be in the current register stack frame.
- 25. The processor of claim 24, wherein the instruction execution unit is adapted to generate an illegal operation fault if the register is determined not to be in the current register stack frame.
- 26. The processor of claim 21, wherein the instruction is one of a plurality of instructions comprising a computer program executing on the processor, and wherein the instruction execution unit is adapted to execute the instruction if the register is determined to be in the current register stack frame, and to halt execution of the program if the register is determined not to be in the current register stack frame.
- 27. The processor of claim 21, wherein the instruction execution unit comprises a combined execution and arithmetic logic unit.
- 28. The processor of claim 21, wherein the instruction execution unit comprises a load/store unit.
- 29. A processor comprising:
a register stack including a plurality of register stack frames, each of the register stack frames including zero or more registers, one of the plurality of register stack frames comprising a current register stack frame; and an instruction execution unit having an input to receive an instruction whose execution requires reading from a register identified by a logical register identifier, the logical register identifier identifying a register that is not within the current register stack frame, and wherein the instruction execution unit is adapted to determine a physical register identifier of a register in the register stack based on the logical register identifier and to execute the instruction using the physical register identifier.
- 30. The processor of claim 29, wherein the instruction execution unit is adapted to execute the instruction using the physical register identifier without generating a fault.
- 31. The processor of claim 29, wherein the logical register identifier indicates a logical register number of the register, and wherein the instruction execution unit is adapted to determine a difference between the logical register number and a logical register number of a register at a bottom of the current register stack frame, add the difference to a physical register number of the register at the bottom of the current register stack frame to determine a sum, and generate the physical register number based on the sum.
- 32. The processor of claim 31, wherein the instruction execution unit is adapted to perform modulus division of the sum by the size of the register stack to determine a remainder, and assign the remainder to the physical register number.
- 33. The processor of claim 29, wherein the instruction execution unit comprises a combined execution and arithmetic logic unit.
- 34. The processor of claim 29, wherein the instruction execution unit comprises a load/store unit.
- 35. In a processor including a register stack, the register stack including a plurality of register stack frames, each of the register stack frames including zero or more registers, one of the plurality of register stack frames comprising a current register stack frame, a method comprising steps of:
(A) identifying a register to be spilled to a backing store; (B) determining whether the identified register is in the current register stack frame; and (C) spilling the register to the backing store only if the identified register is determined not to be in the current register stack frame.
- 36. The method of claim 35, wherein the processor further includes a description of a set of registers within the current register stack frame, and wherein the step (B) comprises a step of:
(B)(1) determining whether the identified register is in the current register stack frame based on the description.
- 37. In a processor including a register stack, the register stack including a plurality of register stack frames, each of the register stack frames including zero or more registers, one of the plurality of register stack frames comprising a current register stack frame, a method comprising steps of:
(A) identifying a register to be filled from a backing store; (B) determining whether the identified register is in the current register stack frame; and (C) filling the register from the backing store only if the identified register is determined not to be in the current register stack frame.
- 38. The method of claim 37, wherein the processor further includes a description of a set of registers within the current register stack frame, and wherein the step (B) comprises steps of:
(B)(1) determining whether the identified register is in the current register stack frame based on the description.
- 39. In a processor including a register stack, the register stack including a plurality of register stack frames, each of the register stack frames including zero or more registers, one of the plurality of register stack frames comprising a current register stack frame, an apparatus comprising:
means for identifying a register to be spilled to a backing store; means for determining whether the identified register is in the current register stack frame; and means for spilling the register to the backing store only if the identified register is determined not to be in the current register stack frame.
- 40. The apparatus of claim 39, wherein the processor further includes a description of a set of registers within the current register stack frame, and wherein the means for determining comprises:
means for determining whether the identified register is in the current register stack frame based on the description.
- 41. In a processor including a register stack, the register stack including a plurality of register stack frames, each of the register stack frames including zero or more registers, one of the plurality of register stack frames comprising a current register stack frame, an apparatus comprising:
means for identifying a register to be filled from a backing store; means for determining whether the identified register is in the current register stack frame; and means for filling the register from the backing store only if the identified register is determined not to be in the current register stack frame.
- 42. The apparatus of claim 41, wherein the processor further includes a description of a set of registers within the current register stack frame, and wherein the means for determining comprises:
means for determining whether the identified register is in the current register stack frame based on the description.
- 43. A processor comprising:
a register stack including a plurality of register stack frames, each of the register stack frames including zero or more registers, one of the plurality of register stack frames comprising a current register stack frame; and a register stack engine to identify a register to be spilled to a backing store, to determine whether the identified register is in the current register stack frame, and to spill the register to the backing store only if the identified register is determined not to be in the current register stack frame.
- 44. The processor of claim 43, further including a description of a set of registers in the current register stack frame, and wherein the register stack engine is further adapted to determine whether the identified register is in the current register stack frame based on the description.
- 45. A processor comprising:
a register stack including a plurality of register stack frames, each of the register stack frames including zero or more registers, one of the plurality of register stack frames comprising a current register stack frame; and a register stack engine to identify a register to be filled from a backing store, to determine whether the identified register is in the current register stack frame, and to fill the register from the backing store only if the identified register is determined not to be in the current register stack frame.
- 46. The processor of claim 45, further including a description of a set of registers within the current register stack frame, and wherein the register stack engine is further adapted to determine whether the identified register is in the current register stack frame based on the description.
RELATED APPLICATIONS
[0001] This application is related to the following commonly owned application, which discloses subject matter related to the disclosure of the present application, and which is hereby incorporated by reference in its entirety:
[0002] U.S. Utility patent application Ser. No. 09/199,003, entitled “Method and Apparatus for Transferring Data Between a Register Stack and a Memory Resource,” filed on Nov. 23, 1998, and naming Jonathan K. Ross, Cary A. Coutant, Carol L. Thompson, and Achmed R. Zahir.
Divisions (1)
|
Number |
Date |
Country |
Parent |
09473820 |
Dec 1999 |
US |
Child |
10702252 |
Nov 2003 |
US |