摘要 |
A method is disclosed for a endian correction at load time, thereby eliminating the need to perform multiple endian correction routines during execution. The method comprises obtaining a platform endian context corresponding to the processor; obtaining a operand endian context indicating the ordering of operands contained in the set of instructions to be loaded; reading an instruction in the set of instructions; determining whether an operational code for the instruction is endian antithetical to the platform endian context; if the operational code for the instruction is endian antithetical, reversing the endian order of the instruction; loading the instruction into an appropriate memory location; and repeating the above steps as required for each instruction until all of the instructions have been loaded into memory. |