Claims
- 1. A method for executing foreign code on a host system, said host system having a storage means for storing foreign code and a database of translated binary code, said method comprising the steps of:
identifying a sequence of foreign code; determining if said sequence of foreign code has corresponding translated binary code stored in said database; if said determining step identifies corresponding translated binary code, transferring said corresponding translated binary code from said database to memory associated with said computer system; if said determining step does not identify corresponding translated binary code, translating said foreign code to obtain a corresponding sequence of translated binary code in said memory.
- 2. The method of claim 1 further comprising the step of saving said sequence of corresponding translated binary code to said database.
- 3. The method of claim 2 further comprising the step of saving a hash value associated with said sequence of corresponding translated binary code.
- 4. The method of claim 3 further comprising the step of saving a portion of said foreign code.
- 5. The method of claim 3 further comprising the step of saving loader information.
- 6. The method of claim 2 further comprising the step of saving an identifying value associated with said sequence of corresponding translated binary code.
- 7. The method of claim 6 wherein said saving step comprises the step of saving a disk sector value.
- 8. The method of claim 1 wherein said identifying as step further comprises the steps of:
transferring a sequence of foreign code from a disk drive sector; using the value of said disk drive sector as an index to said database; and determining if said database contains translated binary code at a location identified by said index.
- 9. The method of claim 1 wherein said identifying as step further comprises the steps of:
determining if said sequence of foreign code has corresponding translated binary code stored in said database.
- 10. A method for executing foreign code on a host system, said host system having a memory and at least one disk drive for storing foreign code and a database of binary code, said method comprising the steps of:
identifying the location where the sequence of foreign code is stored on said disk drive; using said location as an index to said database; if said location correspond to binary code stored in said database, transferring said corresponding translated binary code from said database to said memory; if said location does not correspond to binary code stored in said database, translating said foreign code to obtain a sequence of translated binary code in said memory.
- 11. The method of claim 10 further comprising the step of saving said sequence of translated binary code to said database at a location defined by said index.
- 12. The method of claim 10 wherein said translating step further comprises the steps of:
decoding said foreign code to obtain a sequence of semantic substitutions for said foreign code; optimizing said sequence of semantic substitutions; and monitoring the translation process to support coherence with the foreign code.
- 13. The method of claim 12 further comprising the step of saving said sequence of translated binary code to said database at a location defined by said index.
- 14. The method of claim 12 further comprising the step of saving said sequence of translated binary code to said database at a location defined by said location where said database is stored on second disk drive.
- 15. In a computer system having a first architecture and adapted to execute a host code, said computer system adapted for executing a foreign code different from said host code, said computer system comprising:
a central processor having a plurality of execution units each adapted to execute a plurality of operations in parallel; a memory unit having a first virtual memory space for storing foreign code and a second virtual memory space for storing host code, said host code corresponding to said foreign code; a dynamic binary translation processor for interpreting said foreign code at run-time; means for optimizing said host code to improve execution speed of said host code; a dynamic analysis processor for monitoring the execution of translated binary code and providing memory management functions relating to maintaining host code compaction in said second virtual memory space. a code database for storing at least a portion of said host code corresponding to said foreign code.
- 16. The system of claim 15 further comprising means for determining whether a selected portion of said foreign code corresponds to a portion of said host code stored in said database.
- 17. The system of claim 16 wherein said determining means further comprises means for selectively invoking said translation processor, said optimizing means and said dynamic analysis processor to translate said selected portion of foreign code.
- 18. The system of claim 16 wherein said determining means further comprises means for generating an index to specify a location in said database, said index derived from said foreign code.
- 19. The system of claim 18 wherein said invoking means further comprises a hashing function to generate said index.
- 20. The system of claim 18 wherein said invoking means further comprises means for recovering a storage location of said foreign code to generate said index.
- 21. The system of claim 20 further comprising a disk drive for storing said foreign code in at least one sector of said disk drive.
- 22. The system of claim 16 further comprising a disk drive for storing said foreign code in at least one sector of said disk drive.
- 23. The system of claim 16 further comprising a disk drive for storing said foreign code in at least one sector of said disk drive and a second disk drive for storing said database.
CROSS-REFERENCES TO RELATED APPLICATIONS
[0001] This Continuation-in-part application claims priority from co-pending U.S. patent application Ser. No. 09/505,652, filed Feb. 17, 2000, entitled “System for Improving Translation of Software from a Native Computer Platform to a Target Computer Platform,” which is a non-provisional of U.S. Provisional Patent Application Nos. 60/120,348, 60/120,376, 60/120,380, 60/120,457, 60/120,458, 60/120,459, and 60/120,504, all filed Feb. 17, 1999; each of which is incorporated herein by reference as if set forth in fall in this document.
[0002] This Continuation-in-part application is related to co-pending U.S. patent application Ser. No. ______ (Attorney Docket 20181-49), filed Apr. 18, 2001, entitled “Method and Apparatus for Preserving Precise Exceptions in Binary Translated Code;” U.S. patent application Ser. No. ______ (Attorney Docket 20181-55), filed Apr. 18, 2001, entitled “Method For Emulating Hardware Features Of A Foreign Architecture In A Host Operating System Environment;” and U.S. patent application Ser. No.______ (Attorney Docket 20181-51), filed Apr. 18, 2001, entitled “Method for Effective Binary Translation Between Different Instruction Sets Using Emulated Supervisor Flag and Multiple Page Tables” each of which is incorporated herein by reference as if set forth in fall in this document.
Provisional Applications (7)
|
Number |
Date |
Country |
|
60120348 |
Feb 1999 |
US |
|
60120376 |
Feb 1999 |
US |
|
60120380 |
Feb 1999 |
US |
|
60120457 |
Feb 1999 |
US |
|
60120458 |
Feb 1999 |
US |
|
60120459 |
Feb 1999 |
US |
|
60120504 |
Feb 1999 |
US |
Continuation in Parts (1)
|
Number |
Date |
Country |
| Parent |
09505652 |
Feb 2000 |
US |
| Child |
09838532 |
Apr 2001 |
US |