Method and system for returning emulated results from a trap handler
AssigneeTexas Instruments Incorporated
InventorDouglas A. Johnson
Life of this patent
Estimating the term…
Abstract
A trap handler return for returning emulated results from a trap handler in a data processor includes source and destination register sets, and circuitry for transferring a specified value from the source register set to the destination register set. The trap handler return includes an instruction for returning the emulated result from the source register set to the destination register set. That instruction may be executed in the delay slot of an instruction which causes the transfer of control from the trap handler to the routine which caused the trap.
Claims13
An apparatus for using a value from a trap handler in a computer system invoked by a trap caused by execution of an instruction, wherein said trap handler includes a value return instruction indicating the value and a destination of the value, comprising:
- a source register set for storing said value,
- a destination register set, and
- a multiplexor selectively operative to transfer said value from said source register set to said destination register set;
- wherein said value is a result from said trap handler emulating said value return instruction and said value is transferred from said source register set to said destination register set by the execution of said value return instruction.
A method for using an emulated result from a trap handler invoked from a trapping instruction in a program within a computer system comprising the steps of:
- determining a first argument value to be moved from a source register set to a destination register set;
- determining a second argument value in said source register set identifying a register of the destination register set to which said first argument value is to be moved;
- executing an instruction to transfer control back to said program;
- and using said first argument value and said second argument value in a value return instruction, wherein said value return instruction causes moving of said first argument value from said source register set into said register of said destination register set.
An instruction sequence for execution by a trap handler in a computer system, for using an emulated result from said trap handler to a trapped program, comprising:
- a first instruction for causing the transfer of control from said trap handler to said trapped program;
- a second instruction comprising:
- a value operand;
- and
- a destination operand;
- and
- wherein said value operand indicates a register including said emulated result, and wherein said destination operand indicates the destination register of an instruction causing a trap invoking said trap handler, and wherein said second instruction causes the transfer of said value operand into said destination register and executes in a delay slot of said first instruction.
A method for using an emulated result from a trap from a trapping instruction in a computer system, comprising the steps of:
- executing a first instruction having a delay slot to transfer control to a second instruction immediately following said trapping instruction;
- and
- executing a third instruction in said delay slot for storing said emulated result into a result register of said computer system.
Dependencies are inferred from the claim text.