IP Library › Granted Patent US 10,691,435
Granted Patent B1
US 10,691,435 · App. 16/199,724 · Granted Jun 23, 2020

Processor register assignment for binary translation

Inventors: Alexey Koryakin (Moscow, RU); Nikolay Dobrovolskiy (Moscow, RU); Serguei M. Beloussov (Singapore, SG)
Assignee: Parallels International GmbH
G06F8/52G06F9/30101
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 10,691,435
App. No.
16/199,724
Granted
Jun 23, 2020
Kind
B1
Abstract

Systems and methods for binary translation of executable code. An example binary translation method comprises: decoding a current source code fragment compatible with a source instruction set architecture (ISA); identifying a first source register referenced by the current source code fragment; determining that the first source register is not referenced by a register mapping table, wherein the register mapping table comprises a plurality of entries, each entry specifying a source register, a target register, and a weight value; identifying, among the plurality of mapping table entries, a mapping table entry comprising a highest weight value, wherein the identified mapping table entry specifies a second source register and a second target register; replacing, in the identified mapping table entry, an identifier of the second source register with an identifier of the first source register; and translating, using the mapping table entry, the current source code fragment into a target code fragment, wherein the target code fragment is compatible with a target ISA.

Claims (39)

1. A method comprising:

decoding a current source code fragment compatible with a source instruction set architecture (ISA);

identifying a first source register referenced by the current source code fragment;

determining that the first source register is not referenced by a register mapping table, wherein the register mapping table comprises a plurality of entries, each entry specifying a source register, a target register, and a weight value, wherein the weight value is proportional to a value of a usage path length of the target register;

identifying, among the plurality of mapping table entries, a mapping table entry comprising a highest weight value, wherein the identified mapping table entry specifies a second source register and a second target register;

replacing, in the identified mapping table entry, an identifier of the second source register with an identifier of the first source register; and

translating, using the mapping table entry, the current source code fragment into a target code fragment, wherein the target code fragment is compatible with a target ISA.

2. The method of claim 1 , wherein the weight value is indicative of a number of binary translation iterations since the target register was utilized.

3. The method of claim 1 , wherein the weight value is indicative of usage frequency of the target register.

4. The method of claim 1 , further comprising:

setting the weight value of the identified mapping table entry to a pre-defined initial value.

5. The method of claim 1 , further comprising:

responsive to identifying a second mapping table entry specifying a third source register, a third target register, and a third weight value, such that the third target register is not referenced by the input source code fragment, incrementing the third weight value by a pre-defined value.

6. The method of claim 1 , further comprising:

generating a second target code fragment by processing a second source code fragment; and

generating a tie code for connecting the current target code fragment and the second target code fragment.

7. The method of claim 6 , wherein the tie code performs at least one of: saving a first value of the first target register in a first memory buffer or retrieving a second value of the first target register from a second memory buffer.

8. The method of claim 1 , further comprising:

processing a second source code fragment; and

removing a portion of a tie code associated with the current target code fragment.

9. The method of claim 8 , further comprising:

iteratively processing source code fragments until tie code associated with corresponding target code fragments is stabilized.

10. The method of claim 1 , further comprising:

processing a second source code fragment; and

modify a register mapping associated with the current target code fragment.

11. The method of claim 10 , further comprising:

iteratively processing source code fragments until register mappings associated with corresponding target code fragments are stabilized.

12. A non-transitory computer-readable storage medium comprising executable instructions that, when executed by a computer system, cause the computer system to:

decode a current source code fragment compatible with a source instruction set architecture (ISA);

identify a first source register referenced by the current source code fragment;

determine that the first source register is not referenced by a register mapping table, wherein the register mapping table comprises a plurality of entries, each entry specifying a source register, a target register, and a weight value, wherein the weight value is proportional to a value of a usage path length of the target register;

identify, among the plurality of mapping table entries, a mapping table entry comprising a highest weight value, wherein the identified mapping table entry specifies a second source register and a second target register;

replace, in the identified mapping table entry, an identifier of the second source register with an identifier of the first source register; and

translate, using the mapping table entry, the current source code fragment into a target code fragment, wherein the target code fragment is compatible with a target ISA.

13. The non-transitory computer-readable storage medium of claim 12 , wherein the weight value is indicative of a number of binary translation iterations since the target register was utilized.

14. The non-transitory computer-readable storage medium of claim 12 , further comprising executable instructions causing the computer system to:

generate a second target code fragment by processing a second source code fragment; and

generate a tie code for connecting the current target code fragment and the second target code fragment.

15. The non-transitory computer-readable storage medium of claim 12 , wherein the tie code performs at least one of: saving a first value of the first target register in a first memory buffer or retrieving a second value of the first target register from a second memory buffer.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 26, 2018
From: KORYAKIN, ALEXEY; DOBROVOLSKIY, NIKOLAY; BELOUSSOV, SERGUEI M.
To: PARALLELS INTERNATIONAL GMBH
Reel/Frame 047621/0681 →
Cited By (2)
US 12,265,735 US 12,547,379