ARM处理器对异常的响应过程可用伪代码描述如下:
R14_<exception_mode>=return link
SPSR_<exception_mode>=CPSR
CPSR[4:0]=exception mode number
CPSR[5]=0 /* 当运行于ARM状态时 */
if <exception_mode> == Reset or FIQ then
CPSR[6]=1 /* 禁止新的FIQ中断 */
CPSR[7]=1 /* 禁止新的IRQ中断 */
PC = exception vector address
注意:异常发生时异常模式R14的定义是PC-4。
IRQ、FIQ和ABT(指令预取)异常中断处理程序的返回
发生IRQ或者FIQ异常中断时&