CPC G06F 9/30145 (2013.01) [G06F 9/30047 (2013.01); G06F 9/4552 (2013.01); G06F 21/572 (2013.01)] | 18 Claims |
1. A method for executing new instructions, used in a processor, comprising:
receiving an instruction;
generating an unknown instruction exception when the received instruction is an unknown instruction;
in response to the unknown instruction exception, executing the following steps through a conversion program:
determining whether the received instruction is a new instruction;
converting the received instruction into at least one old instruction and storing the at least one old instruction in a memory or a cache when the received instruction is a new instruction; and
executing the at least one old instruction in the same execution mode as the received instruction;
wherein the method further comprises:
receiving another instruction;
determining whether the another received instruction is an unknown instruction;
generating another unknown instruction exception when the another received instruction is an unknown instruction;
in response to the another unknown instruction exception, determining whether the received instruction and the another received instruction are the same instruction when the another received instruction is a new instruction;
obtaining the at least one old instruction from the memory or the cache when the received instruction and the another received instruction are the same instruction; and
executing the at least one old instruction.
|