Method and apparatus for executing stack-based programs
OwnerMaciej Kubiczek, Christopher Robert Turnerinventors
Life of this patent
Estimating the term…
Loading patent…
OwnerMaciej Kubiczek, Christopher Robert Turnerinventors
Estimating the term…
A method of executing a stack-based program using a processor having a register-based architecture, the processor having means for simulating a stack using a subset of its registers such that the processor may operate in a simulated stack-based mode as well as a register-based mode. The method comprises the steps of fetching stack-based instructions from a program memory, translating individual stack-based instructions or sequences of stack-based instructions into register-based instructions, and including in at least certain of the translated instructions an indication that these instructions are to be executed using the simulated stack-based mode. Translated instructions, including said indication, are executed using the simulated stack-based mode, and other translated instructions are executed using the register-based mode.
A method of executing a stack-based program using a processor having a register-based architecture, the processor having means for implementing a stack using registers of the processor such that the processor may operate in a stack-based mode as well as a register-based mode, the method comprising the steps of:
A method according to any one of the preceding claims, wherein the stack based-program is a JVM program, and the processor having a register-based architecture is a RISC processor such that the register-based instructions are RISC instructions.
A method according to any one of the preceding claims, wherein said indication that a translated instruction is to be executed using the stack-based mode is provided by the inclusion, in a register address space of the instruction, of a phantom register address.
A method according to any one of the preceding claims, wherein the means for implementing a stack comprises a stack counter which points to the top of the simulated stack.
Apparatus for executing a stack-based program, the apparatus comprising:
Dependencies are inferred from the claim text.