摘要 |
<p>A method of executing a stack-based program containing branch instructions 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: translating each branch instruction of the stack-based program into a branch instruction of a register-based program and including in the translated instruction an indication that the instruction relates to the stack-based operation mode; examining each translated branch instruction and, if the instruction includes said indication, updating a stack counter of said means for implementing a stack; and executing the branch instruction.</p> |