Detecting reordered side-effects
First Claim
1. A computer, comprising;
- a binary translator programmed to translate at least a segment of a first binary representation of a program from a first binary representation in a first instruction set to a second binary representation in a second instruction set, a sequence of side-effects in the second binary representation differing from a sequence of side-effects in the translated segment of the first binary representation, the second binary representation distinguishing individual memory loads that are believed to be directed to well-behaved memory from memory loads that are believed to be directed to non-well-behaved memory device(s);
instruction execution circuitry designed, while executing the second binary representation,to identify an individual memory-reference instruction, or an individual memory reference of an instruction, a side-effect arising from the memory reference having been reordered by the translator, the memory reference having been believed at translation time to be directed to well-behaved memory but that at execution time is found to reference a device with a valid memory address that cannot be guaranteed to be well-behaved, based at least in part on an annotation encoded in a segment descriptor, andbased in the distinguishing, to identify whether the difference in sequence of side-effects may have a material effect on the execution of the program; and
circuitry and/or software designed to establish program state to a state equivalent to a state that would have occurred in the execution of the first binary representation, and to resume execution of the translated segment of the program in the first instruction set.
3 Assignments
0 Petitions
Accused Products
Abstract
A computer binary translator translates at least a segment of a binary representation of a program from a first instruction set architecture to a second instruction set architecture. A sequence of side-effects in the translation differs from a sequence of side-effects in the original. The translation distinguishes memory loads that are believed to be directed to well-behaved memory from memory loads that are believed to be directed to non-well-behaved memory device(s). Instruction execution circuitry identifies a memory reference that has a side-effect that has been reordered by translation, the memory reference having been believed at translation time to be directed to well-behaved memory but at execution it is found that the reference cannot be guaranteed to be well-behaved. The instruction execution circuitry identifies whether the difference in side-effect order may have a material effect on the execution of the program. A roll-back program state is established, and execution of the original code resumes.
364 Citations
64 Claims
-
1. A computer, comprising;
-
a binary translator programmed to translate at least a segment of a first binary representation of a program from a first binary representation in a first instruction set to a second binary representation in a second instruction set, a sequence of side-effects in the second binary representation differing from a sequence of side-effects in the translated segment of the first binary representation, the second binary representation distinguishing individual memory loads that are believed to be directed to well-behaved memory from memory loads that are believed to be directed to non-well-behaved memory device(s); instruction execution circuitry designed, while executing the second binary representation, to identify an individual memory-reference instruction, or an individual memory reference of an instruction, a side-effect arising from the memory reference having been reordered by the translator, the memory reference having been believed at translation time to be directed to well-behaved memory but that at execution time is found to reference a device with a valid memory address that cannot be guaranteed to be well-behaved, based at least in part on an annotation encoded in a segment descriptor, and based in the distinguishing, to identify whether the difference in sequence of side-effects may have a material effect on the execution of the program; and circuitry and/or software designed to establish program state to a state equivalent to a state that would have occurred in the execution of the first binary representation, and to resume execution of the translated segment of the program in the first instruction set.
-
-
2. A method, comprising the step of:
for memory references generated as part of executing a stream of instructions on a computer, evaluating whether an individual memory reference of an instruction references a device having a valid memory address but that cannot be guaranteed to be well-behaved, based at least in part on an annotation encoded in a segment descriptor, a segment descriptor being data for controlling address formation by designating a segment base address, a segment length, and segment access control information. - View Dependent Claims (3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
14. A computer, comprising:
instruction execution circuitry designed to evaluate, based at least in part on an annotation encoded in a segment descriptor, a segment descriptor being data for controlling address formation by designating a segment base address, a segment length, and segment access control information, whether an individual memory-reference instruction, or an individual memory reference of an instruction, references a device with a valid memory address that cannot be guaranteed to be well-behaved. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21)
-
22. A method, comprising the steps of:
-
while translating at least a segment of a first binary representation of a program from a first instruction set to a second binary representation in a second instruction set, distinguishing individual memory loads that are believed to be directed to well-behaved memory from memory loads that are believed to be directed to non-well-behaved memory device(s); while executing the second binary representation, identifying a load that was believed at translation time to be directed to well-behaved memory but that at execution time is found to be directed to non-well-behaved memory, based at least in part on an annotation encoded in a segment descriptor, and aborting the identified memory load, a segment descriptor being data for controlling address formation by designating a segment base address, a segment length, and segment access control information; and based at least in part on the identifying, re-executing at least a portion of the translated segment of the program in the first instruction set. - View Dependent Claims (23, 24, 25, 26, 27, 28, 29)
-
-
30. An apparatus, comprising:
-
a binary translator programmed to translate at least a segment of a first binary representation of a program from a first instruction set to a second binary representation in a second instruction set, distinguishing individual memory loads that are believed to be directed to well-behaved memory from memory loads that are believed to be directed to non-well-behaved memory; and instruction execution circuitry designed to execute the translated program in the second binary representation, and to identify, based at least in part on an annotation encoded in a segment descriptor, a segment descriptor being data for controlling address formation by designating a segment base address, a segment length, and segment access control information, memory loads that were believed at translation time to be directed to well-behaved memory but that at execution time are found to be directed to non-well-behaved memory, and to abort the identified memory load. - View Dependent Claims (31, 32, 33, 34, 35, 36, 37, 38, 39)
-
-
40. A method, comprising the steps of:
-
translating at least a segment of a source program into an object program, the source program instructing a reference execution with a reference sequence of side-effects, the object program instructing an execution in which the sequence of side-effects differs from the reference side-effect sequence; during an execution of the object program on a computer, detecting a side-effect about to be committed to processor state in which the differing side-effect sequence may have a material effect on the execution of the program, and aborting the side-effect; establishing a program state equivalent to a state that would have occurred in the reference execution; and resuming execution of the program from the established state in an execution mode that reflects the reference side-effect sequence. - View Dependent Claims (41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54)
-
-
55. An apparatus, comprising:
-
a binary translator programmed to translate at least a segment of a program from a first binary representation in a first instruction set to a second binary representation in a second instruction set, a sequence of side-effects in the second binary representation differing from a sequence of side-effects in the translated segment of the first binary representation; and instruction execution circuitry and/or software designed to identify cases during execution of the second binary representation in which the difference in sequence of side-effects may have a material effect on the execution of the program, before committing the side-effect to processor state, and aborting the side-effect; and to establish a program state equivalent to a state that would have occurred in the execution of the first binary representation, and to resume execution of the program from the established state in an execution mode that reflects the side-effect sequence of the first binary representation. - View Dependent Claims (56, 57, 58, 59, 60, 61, 62, 63, 64)
-
Specification