Datasheet

Programmer’s Model
ARM7TDMI Data Sheet
ARM DDI 0029E
3-13
Open Access
After fixing the reason for the abort, the handler should execute the following
irrespective of the state (ARM or Thumb):
SUBS PC,R14_abt,#4 for a prefetch abort, or
SUBS PC,R14_abt,#8 for a data abort
This restores both the PC and the CPSR, and retries the aborted instruction.
3.9.7 Software interrupt
The software interrupt instruction (SWI) is used for entering Supervisor mode, usually
to request a particular supervisor function. A SWI handler should return by executing
the following irrespective of the state (ARM or Thumb):
MOV PC, R14_svc
This restores the PC and CPSR, and returns to the instruction following the SWI.
3.9.8 Undefined instruction
When ARM7TDMI comes across an instruction which it cannot handle, it takes the
undefined instruction trap. This mechanism may be used to extend either the THUMB
or ARM instruction set by software emulation.
After emulating the failed instruction, the trap handler should 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.
3.9.9 Exception vectors
The following table shows the exception vector addresses.
Address Exception Mode on entry
0x00000000 Reset Supervisor
0x00000004 Undefined instruction Undefined
0x00000008 Software interrupt Supervisor
0x0000000C Abort (prefetch) Abort
0x00000010 Abort (data) Abort
0x00000014
Reserved Reserved
0x00000018 IRQ IRQ
0x0000001C FIQ FIQ
Table 3-3: Exception vectors