IP Library Granted Patent US 7,761,857
Granted Patent B1
US 7,761,857 · App. 09/417,332 · Granted Jul 20, 2010

Method for switching between interpretation and dynamic translation in a processor system based upon code sequence execution counts

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,761,857
App. No.
09/417,332
Granted
Jul 20, 2010
Kind
B1
Abstract

A method for executing a target application on a host processor including the steps of translating each target instruction being to be executed into host instructions, storing the translated host instructions, executing the translated host instructions, responding to an exception during execution of a translated instruction by rolling back to a point in execution at which correct state of a target processor is known, and interpreting each target instruction in order from the point in execution at which correct state of a target processor is known.

Claims (71)

1. A method for executing a target application on a host processor comprising:

interpreting each of a sequence of target instructions to produce a sequence of host instructions and executing the sequence of host instructions;

translating into host instructions each of a sequence of target instructions to produce translated host instructions, wherein the translating is performed when the number of times a sequence of target instructions is executed exceeds a preset count;

storing the translated host instructions wherein a plurality of additional registers are used during execution for holding the official state of a target processor;

responding to an exception during execution of a stored translated host instruction by rolling back to a previous point in execution at which correct state of a target processor is known; and

interpreting each target instruction in order from the point in execution at which a correct state of a target processor is known.

2. The method as claimed in claim 1 which further comprises:

collecting statistics regarding the execution of sequences of instructions which are interpreted.

3. The method as claimed in claim 1 , further comprising:

speculatively translating target instructions into host instructions based on a likelihood of a branch being taken.

4. The method as claimed in claim 1 , further comprising:

collecting statistics regarding the execution of sequences of target instructions which are executed.

5. The method as claimed in claim 4 , wherein the statistics include the number of times a branch to target instructions have executed.

6. The method as claimed in claim 5 , further comprising:

speculatively translating target instructions into host instructions based on a likelihood of a branch being taken.

7. The method as claimed in claim 1 , further comprising:

collecting statistics regarding the execution of sequences of target operations which are executed.

8. The method as claimed in claim 7 , wherein the statistics comprise the number of times a branch of target operations have executed.

9. The method as claimed in claim 8 , further comprising:

speculatively translating target operations into host operations based on a likelihood of a branch being taken.

10. A method for executing a target application on a host processor comprising the:

interpreting sequentially each of a sequence of target instructions to produce interpreted host instructions and executing the interpreted host instructions representing each target instruction of the target application;

performing a translation process when the number of times a host instruction is executed exceeds a preset count to produce translated host instructions wherein a plurality of additional registers are used during execution for holding the official state of a target processor;

responding to an exception during execution of the translated host instructions representing a target instruction by returning to a previous point in execution of the target application at which a correct state of a target processor is known; and

thereafter executing host instructions by interpretation of the target instruction until the point of the exception.

11. The method as claimed in claim 10 which further comprises collecting statistics regarding the execution of sequences of target instructions which are executed.

12. The method as claimed in claim 11 in which the statistics include the number of times the sequence of target instructions have executed.

13. The method as claimed in claim 11 in which the statistics include an address of an instruction to which a target instruction including a branch operation branches.

14. The method as claimed in claim 11 in which the statistics include a likelihood of a branch being taken.

15. A computer system comprising:

a bus;

a memory unit coupled with the bus, wherein said memory unit is operable to store computer-readable instructions for executing a target application designed for execution on a target processor on a host processor having an instruction set different than that of the target processor; and

a processor coupled with the bus, wherein when the computer readable instructions comprise:

instructions to interpret a sequence of target instructions to produce a sequence of host instructions and executing each of the sequences of host instructions;

instructions to translate sequences of target instructions to produce translated sequences of instructions when the number of times a sequence of target instructions is executed exceeds a preset count;

instructions to store each translated sequence of instructions wherein a plurality of additional registers are used during execution for holding the official state of the target processor,

instructions to respond to an exception during execution of a stored translated instruction by rolling back to a previous point in execution at which correct state of a target processor is known, and

instructions to interpret each target instruction in order from a point in execution at which a correct state of a target processor is known through the target instruction causing the exception.

16. The system as claimed in claim 15 in which the instructions to interpret comprise an interpreter software executing on the host processor, and

the instructions to translate comprise dynamic translation software executing on the host processor.

17. The computer-readable medium as claimed in claim 15 , further comprising:

instructions to collect statistics including the number of times a branch of target instructions have executed.

18. The computer-readable medium of claim 17 , further comprising:

instructions to speculatively translating target instructions into host instructions based on a likelihood of a branch being taken.

19. A method for executing a target application on a host processor comprising:

interpreting each of a sequence of target instructions to produce host instructions and executing the host instructions;

translating into translated host instructions each of a sequence of target instructions, wherein the translating is performed when the number of times a sequence of target instructions is executed exceeds a preset count;

storing the translated host instructions wherein a plurality of additional registers are used during execution for holding the official state of a target processor and wherein a buffer stores working memory state changes and official memory state changes;

responding to an exception during execution of a stored translated host instruction by rolling back to a previous point in execution at which a correct state of a target processor is known; and

interpreting each target instruction in order from the point in execution at which the correct state of a target processor is known.

20. A method for executing a target application on a host microprocessor, the method comprising:

interpreting each of a sequence of target operations to produce host operations and executing the host operations;

translating into host operations each of a sequence of target operations to produce translated host operations, wherein said translating is performed when the number of times a sequence of target operations is executed exceeds a predetermined count;

storing the translated host operations, wherein a plurality of additional registers are used during execution for holding the official state of a target microprocessor;

responding to an exception during execution of a stored translated host operation by rolling back to a previous time in execution at which a correct state of a target microprocessor is known; and

interpreting each target operation in order from the time in execution at which the correct state of a target microprocessor is known.

21. The method as claimed in claim 20 , further comprising:

collecting statistics regarding the execution of sequences of operations which are interpreted.

22. The method as claimed in claim 20 , further comprising:

speculatively translating target operations into host instructions based on a likelihood of a branch being taken.

23. A tangible computer-readable medium having instructions stored thereon, the instructions comprising:

instructions to interpret a sequence of target instructions to produce host instructions and execute each of the host instructions;

instructions to translate sequences of target instructions to produce sequences of host instructions when the number of times a sequence of target instructions is executed exceeds a preset count;

instructions to store each translated sequence of instructions, wherein a plurality of additional registers are used during execution for holding the official state of the target processor;

instructions to respond to an exception during execution of a stored translated instruction by rolling back to a previous point in execution at which a correct state of a target processor is known; and

instructions to interpret each target instruction in order from a point in execution at which the correct state of a target processor is known through the target instruction causing the exception.

24. The computer-readable medium as claimed in claim 23 , wherein said instructions to interpret comprise an interpreter software executing on a host processor, and wherein said instructions to translate comprise dynamic translation software executing on the host processor.

25. The computer-readable medium as claimed in claim 23 , wherein the instructions further comprise:

instructions to collect statistics including the number of times a branch of target instructions have executed.

26. The computer-readable medium as claimed in claim 25 , wherein the instructions further comprise:

instructions to speculatively translate target instructions into host instructions based on a likelihood of a branch being taken.

Assignments (2)
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNOR'S NAME PREVIOUSLY RECORDED AT REEL: 036711 FRAME: 0160. ASSIGNOR(S) HEREBY CONFIRMS THE MERGER. Recorded Oct 6, 2015
From: INTELLECTUAL VENTURES FUNDING LLC
To: INTELLECTUAL VENTURES HOLDING 81 LLC
Reel/Frame 036797/0356 →
MERGER Recorded Sep 29, 2015
From: INTELLECTUAL VENTURE FUNDING LLC
To: INTELLECTUAL VENTURES HOLDING 81 LLC
Reel/Frame 036711/0160 →