| |||
| Home > Programmer’s Model > Exceptions > Undefined instruction | |||
When the ARM720T processor encounters an instruction that it cannot handle, it takes the Undefined Instruction trap. This mechanism can be used to extend either the Thumb or ARM instruction set by software emulation.
After emulating the failed instruction, the trap handler must execute the following irrespective of the state (ARM or Thumb):
MOVS PC, r14_und
This restores the CPSR and returns to the instruction following the Undefined Instruction.