التفاصيل البيبلوغرافية
العنوان: |
Transitioning From Source Instruction Set Architecture (ISA) Code To Translated Code In A Partial Emulation Environment |
Document Number: |
20110153307 |
تاريخ النشر: |
June 23, 2011 |
Appl. No: |
12/646054 |
Application Filed: |
December 23, 2009 |
مستخلص: |
In one embodiment, a processor can operate in multiple modes, including a direct execution mode and an emulation execution mode. More specifically, the processor may operate in a partial emulation model in which source instruction set architecture (ISA) instructions are directly handled in the direct execution mode and translated code generated by an emulation engine is handled in the emulation execution mode. Embodiments may also provide for efficient transitions between the modes using information that can be stored in one or more storages of the processor and elsewhere in a system. Other embodiments are described and claimed. |
Inventors: |
Winkel, Sebastian (Los Altos, CA, US); Yamada, Koichi (Los Gatos, CA, US); Srinivas, Suresh (Portland, OR, US); Smith, James E. (San Jose, CA, US) |
Claim: |
1. An apparatus comprising: a breakpoint cache including a plurality of entries each to store an emulation indicator to indicate if at least one of a set of instructions stored in an instruction storage corresponding to the entry is associated with translated code stored in a translation cache; a map cache including a plurality of entries each to store a mapping between a location of a source instruction set architecture (ISA) instruction and a location for translated code stored in the translation cache for the source ISA instruction; and logic coupled to the breakpoint cache and the map cache to determine whether to cause a jump of control of the apparatus from a direct execution mode to an emulation execution mode based on at least one of a corresponding emulation indicator in the breakpoint cache and a mapping in the map cache. |
Claim: |
2. The apparatus of claim 1, wherein the apparatus is to access a breakpoint table that stores emulation indicators for the set of instructions stored in the instruction storage if a control transfer instruction does not include an entry in the breakpoint cache. |
Claim: |
3. The apparatus of claim 2, further comprising an instruction cache coupled to the breakpoint cache, wherein the apparatus is to store an emulation indicator from the breakpoint cache into a corresponding entry of the instruction cache when an instruction is written into the instruction cache. |
Claim: |
4. The apparatus of claim 3, wherein if the control transfer instruction does not include a corresponding entry in the map cache, an emulation engine is to access a map table stored in a concealed memory to obtain the mapping and to store the mapping in an entry of the map cache. |
Claim: |
5. The apparatus of claim 4, further comprising an instruction decoder coupled between the instruction cache and an execution unit, and a bypass path coupled between the instruction cache and the execution unit to provide instructions directly to the execution unit in the emulation execution mode. |
Claim: |
6. The apparatus of claim 1, wherein the apparatus comprises a processor and the logic is to access the breakpoint cache responsive to a jump instruction. |
Claim: |
7. The apparatus of claim 6, wherein the processor is to use the emulation execution mode to execute an instruction of an ISA for which micro-architecture hardware is not present in the processor. |
Claim: |
8. The apparatus of claim 7, wherein the micro-architecture hardware of the processor is of a second ISA different than the ISA. |
Claim: |
9. The apparatus of claim 6, wherein the processor is a hardware/software co-design processor to operate according to a partial emulation model. |
Claim: |
10. The apparatus of claim 6, wherein the processor includes first micro-architecture hardware to perform a first set of instructions of an ISA and does not include micro-architecture hardware to perform at least one second instruction corresponding to an extension of the ISA. |
Claim: |
11. The apparatus of claim 10, wherein the translation cache includes code to perform the at least one second instruction. |
Claim: |
12. A method comprising: accessing an entry of a first storage of a processor to determine if a memory segment associated with an instruction pointer includes code controlled by an emulation engine; if so, using a value obtained from the instruction pointer to access an entry of a first table including a plurality of entries each to store at least a portion of translated code; and executing the translated code stored in the entry in an execution unit of the processor if the first table entry corresponds to the instruction pointer. |
Claim: |
13. The method of claim 12, further comprising performing an in-line check using information in the first table entry to determine if the entry corresponds to the instruction pointer. |
Claim: |
14. The method of claim 13, further comprising, if the first table entry does not correspond to the instruction pointer; transferring control to the emulation engine to determine a location of translated code associated with the instruction pointer; and obtaining an address for the translated code in a translation cache, and executing the translated code in the execution unit of the processor. |
Claim: |
15. The method of claim 12, wherein the processor is a hardware/software co-design processor to operate according to a partial emulation model. |
Claim: |
16. The method of claim 12, further comprising accessing a vector associated with the memory segment to determine if a portion of the memory segment corresponding to the instruction pointer includes the emulation engine-controlled code. |
Claim: |
17. The method of claim 16, further comprising accessing a user-visible portion of system memory to obtain executable code for the instruction pointer if the portion of the memory segment corresponding to the instruction pointer does not include the emulation engine-controlled code. |
Claim: |
18. The method of claim 16, further comprising setting a first indicator of the vector associated with the portion to indicate presence of the emulation engine-controlled code when the emulation engine-controlled code is stored in a translation cache. |
Claim: |
19. The method of claim 12, further comprising accessing a translation table before accessing the first storage to determine if the instruction pointer is associated with an entry of the translation table, the translation table including a plurality of entries each to store an instruction pointer value and an address of a translation cache at which translated code for the instruction pointer value is to begin. |
Claim: |
20. The method of claim 19, further comprising accessing the first storage only if the instruction pointer value is not stored in any entry of the translation table. |
Claim: |
21. A system comprising: a processor including at least one execution unit to perform first instructions in a direct execution mode and to perform translated code generated by an emulation engine in an emulation execution mode for second instructions, wherein the processor includes hardware support for the first instructions and does not include hardware support for at least some of the second instructions; and a dynamic random access memory (DRAM) coupled to the processor, wherein the first and second instructions are to remain unmodified in the DRAM. |
Claim: |
22. The system of claim 21, wherein the processor further comprises a first cache having a plurality of entries each to store a breakpoint indicator to indicate if any location of a memory block is associated with translated code stored in a translation cache. |
Claim: |
23. The system of claim 22, wherein the processor further comprises a second cache including a plurality of entries each to store an address of the translation cache at which translated code corresponding to an input address is located. |
Claim: |
24. The system of claim 23, wherein the processor further comprises a third cache including a plurality of entries each to store a vector having a plurality of bits each to indicate whether a corresponding subset of a memory block is associated with the translated code. |
Claim: |
25. The system of claim 24, wherein the processor further comprises logic coupled to the first cache, the second cache, and the third cache to determine whether to cause a jump of processor control from the direct execution mode to the emulation execution mode based on at least one of a translation cache address from the second cache, a corresponding breakpoint indicator from the first cache, and a corresponding bit from the third cache. |
Claim: |
26. The system of claim 22, wherein the processor further comprises an address hash generator to generate a hash of an address used to access the first cache and to access an entry in a hash table based on the hash to begin execution of translated code stored in the hash table entry. |
Claim: |
27. The system of claim 21, wherein the processor is to use the emulation execution mode to execute an instruction of a different instruction set architecture (ISA) than an ISA of the processor. |
Current U.S. Class: |
703/26 |
Current International Class: |
06; 06; 06; 06 |
رقم الانضمام: |
edspap.20110153307 |
قاعدة البيانات: |
USPTO Patent Applications |