System and method for obtaining correct byte addresses by using logical operations on 2 least significant bits of byte address to facilitate compatibility between computer architectures having different memory orders
First Claim
1. A method for converting a program designed to be executed on a computer system employing a first predefined memory order to a program which is executable on a computer system employing a second predefined memory order different from said first predefined memory order, the method comprising the steps of:
- finding all instructions in the program which operate on bytes of data, each of said bytes of data having a byte address, each byte address having two least significant bits;
operating on the two least significant bits of each byte address using a logic function to thereby generate two complementary bits for each byte address; and
replacing the two least significant bits of the byte address with two complementary bits to thereby generate a new byte address for each of said bytes of data.
9 Assignments
0 Petitions
Accused Products
Abstract
A method and computer program-product for converting a program designed to be executed on a computer system employing a first predefined memory order, such as the Big Endian architecture, to a program which is executable on a computer system employing a second predefined memory order, such as the Little Endian architecture. The method and computer program-product uses the fact that performing a logical operation on the lower two bits of a byte address in one architecture converts that byte address to the equivalent byte address in the other architecture. The method and computer program-product are implemented in software by scanning the instructions of the input for load and store instructions. The software modifies the instructions by taking the contents of the register and operating on the two least significant bits of the byte address with a logical operation to generate two complementary bits used to replace the two least significant bits of the byte address to generate a new byte address that corresponds with the other architecture.
-
Citations
11 Claims
-
1. A method for converting a program designed to be executed on a computer system employing a first predefined memory order to a program which is executable on a computer system employing a second predefined memory order different from said first predefined memory order, the method comprising the steps of:
-
finding all instructions in the program which operate on bytes of data, each of said bytes of data having a byte address, each byte address having two least significant bits; operating on the two least significant bits of each byte address using a logic function to thereby generate two complementary bits for each byte address; and replacing the two least significant bits of the byte address with two complementary bits to thereby generate a new byte address for each of said bytes of data. - View Dependent Claims (2, 3, 4)
-
-
5. A computer system employing a first predefined memory order which converts and executes programs designed to be executed on computer systems employing a second predefined memory order different from said first predefined memory order, comprising:
-
means for finding all instructions in the program which operate on bytes of data, each of said bytes of data having a byte address, each byte address having two least significant bits; means for operating on the least two significant bits of each byte address using a logic function to thereby generate two complementary bits for each byte address; and means for replacing the least two significant bits of each byte address with the two complementary bits to thereby generate a new byte address for each of said bytes of data. - View Dependent Claims (6, 7)
-
-
8. A computer program-product storage device readable by a computer system, tangibly embodying a computer program-product comprising instructions executable by the computer system to perform method steps for converting a program designed to be executed on a computer system employing a first predefined memory order to a program which is executable on a computer system employing a second predefined memory different from said first predefined memory order, the method comprising the steps of:
-
finding all instructions in the program which operate on bytes of data, each of said bytes of data having a byte address, each byte address having two least significant bits; operating on the two least significant bits of each byte address using a logic function to thereby generate two complementary bits for each byte address; and replacing the two least significant bits of the byte address with two complementary bits to thereby generate a new byte address for each of said bytes of data. - View Dependent Claims (9, 10, 11)
-
Specification