Exceptions 3-11
Rev. A Copyright © 2000 by LSI Logic Corporation. All rights reserved.
3.6 Exceptions
Exceptions arise whenever the normal flow of a program has to be halted
temporarily, for example, to service an interrupt from a peripheral. Before
an exception can be handled, the ARM7TDMI-S preserves the current
processor state so that the original program can resume when the
handler routine has finished.
If multiple exceptions arise at the same time, they are dealt with in a fixed
order shown in Section 3.6.9, “Exception Priorities.”
Table 3.2 summarizes the PC value preserved in the relevant R14
register on exception entry, and the recommended instruction for exiting
Table 3.1 Mode Bit States
M[4:0] Mode Accessible Thumb State
Registers Accessible ARM State
Registers
0b10000 User R7..R0, LR, SP, PC, CPSR R14..R0, PC, CPSR
0b10001 FIQ R7..R0, LR_fiq, SP_fiq, PC, CPSR,
SPSR_fiq R7..R0, R14_fiq..R8_fiq, PC,
CPSR, SPSR_fiq
0b10010 IRQ R7..R0, LR_irq, SP_irq, PC, CPSR,
SPSR_irq R12..R0, R14_irq..R13_irq, PC,
CPSR, SPSR_irq
0b10011 Supervisor R7..R0, LR_svc, SP_svc, PC,
CPSR, SPSR_svc R12..R0, R14_svc..R13_svc, PC,
CPSR, SPSR_svc
0b10111 Abort R7..R0, LR_abt, SP_abt, PC,
CPSR, SPSR_abt R12..R0, R14_abt..R13_abt, PC,
CPSR, SPSR_abt
0b11011 Undefined R7..R0, LR_und, SP_und, PC,
CPSR, SPSR_und R12..R0, R14_und..R13_und, PC,
CPSR
0b11111 System R7..R0, LR, SP, PC, CPSR R14..R0, PC, CPSR