Methods and systems for mapping a function pointer to the device code
AssigneeIntel Corporation
InventorsYang Ni, Ali-Reza Adl-Tabatabai, Tatiana Shpeisman
Life of this patent
Estimating the term…
Abstract
Methods for mapping a function pointer to the device code are presented. In one embodiment, a method includes identifying a function which is executable by processing devices. The method includes generating codes including a first code corresponds to a first processing device and a second code corresponds to a second processing device. The second processing device is architecturally different from the first processing device. The method further includes storing the second code in a byte string such that the second code is retrievable if the function will be executed by the second processing device.
Claims10
A method comprising:
- identifying a first function which is executable by two or more processing devices;
- generating a first code corresponding to the first function, at a first processing device, for execution at the first processing device;
- generating a second code corresponding to the first function, at the first processing device;
- generating a prologue, at the first processing device, including an instruction having a first operand that is a unique code pattern providing a reserved memory destination location and a pointer to a beginning of code in a byte string for the first function to be executed at a second processing device architecturally different from the first processing device;
- wherein the generating of the second code comprises the generating of the prologue and the unique code pattern indicates the presence of the pointer;
- and
- storing the second code in the byte string such that the second code is retrievable if the first function will be executed by the second processing device.
An article of manufacture comprising a non-transitory computer readable storage medium including data storing instructions thereon that, when accessed by a machine, cause the machine to perform a method comprising:
- identifying a first function which is executable by two or more processing devices;
- generating a first code corresponding to the first function, at a first processing device, for execution at the first processing device;
- generating a second code corresponding to the first function, at the first processing device;
- generating a prologue, at the first processing device, including an instruction having a first operand that is a unique code pattern providing a reserved memory destination location and a pointer to a beginning of code in a byte string for the first function to be executed at a second processing device architecturally different from the first processing device;
- wherein the generating of the second code comprises the generating of the prologue and the unique code pattern indicates the presence of the pointer;
- and
- storing the second code in the byte string such that the second code is retrievable if the first function will be executed by the second processing device.
A system to execute programs, comprising:
- a first processing device to generate a first function;
- a second processing device;
- and
- memory to store a program including the first function executable by the first processing device and the second processing device during runtime, wherein the first function is associated with a prologue which includes an instruction having a first operand that is a unique code pattern providing a reserved memory destination location and a pointer to a beginning of code in a byte string for the first function to be executed at the second processing device architecturally different from the first processing device, and wherein the unique code pattern indicates the presence of the pointer.
Dependencies are inferred from the claim text.