Method for the migration of hardware-proximate, subprogram-independent programs with portable and non-portable program parts
First Claim
1. A method for moving hardware-proximate and subprogram-independent program code for a source hardware into a program code for a destination hardware having an architecture deviating from an architecture of the source hardware, the program code to be moved being composed of portable and non-portable program parts, comprising the steps of:
- translating the portable program parts into code for the destination hardware; and
, therebyidentifying all possible entry points at which said portable program parts are branchable to proceeding from other program parts;
generating a specific bit pattern in said portable program parts at all such entry points, said specific bit pattern representing a dummy command of the destination hardware without yielding a valid operation for the source hardware;
generating program code that, at run time on the destination hardware, checks a branch destination of a corresponding exit to determined if the specific bit pattern is present at all potential exit points of non-local branchings leading out from one of said portable program parts, and, if the specific bit pattern is not present, activating an emulator that emulates the non-portable program part on the destination hardware that has been branched to and that is consequently present as non-portable code for the source hardware; and
carrying out a check to determine if the specific bit pattern is present at a destination address in the emulation given all potentially non-local exits from an emulated program part and, if the specific bit pattern is present, ending the emulation.
2 Assignments
0 Petitions
Accused Products
Abstract
The method is for moving hardware-proximate and subprogram-independent program code. Portable program parts (C, D) for the destination hardware are respectively recompiled and all entry points at which these program parts can be branched to proceeding from other program parts are identified. A specific bit pattern (NOP) is respectively generated at these entry points, this bit pattern representing, on the one hand, a dummy command of the destination hardware but, on the other hand, not representing a valid operation for the source hardware. Moreover, program code is generated at all potential exit points of non-local branchings, this program code checking the branch destination of the corresponding branch at the run time to see whether the specific bit pattern (NOP) is present thereat. When this is not the case, an emulator (EM) is activated that emulates the program part branched to and consequently present as non-portable code (A, B) for the source hardware on the destination hardware. A check is likewise carried out in the emulation at all potential non-local branches to see whether the specific bit pattern (NOP) is present at the destination address and the emulation is ended as warranted.
19 Citations
2 Claims
-
1. A method for moving hardware-proximate and subprogram-independent program code for a source hardware into a program code for a destination hardware having an architecture deviating from an architecture of the source hardware, the program code to be moved being composed of portable and non-portable program parts, comprising the steps of:
-
translating the portable program parts into code for the destination hardware; and
, therebyidentifying all possible entry points at which said portable program parts are branchable to proceeding from other program parts; generating a specific bit pattern in said portable program parts at all such entry points, said specific bit pattern representing a dummy command of the destination hardware without yielding a valid operation for the source hardware; generating program code that, at run time on the destination hardware, checks a branch destination of a corresponding exit to determined if the specific bit pattern is present at all potential exit points of non-local branchings leading out from one of said portable program parts, and, if the specific bit pattern is not present, activating an emulator that emulates the non-portable program part on the destination hardware that has been branched to and that is consequently present as non-portable code for the source hardware; and carrying out a check to determine if the specific bit pattern is present at a destination address in the emulation given all potentially non-local exits from an emulated program part and, if the specific bit pattern is present, ending the emulation. - View Dependent Claims (2)
-
Specification