如题,我看了很多的三星44B0,S3C2410的启动代码异常时都是用这个宏,这样异常处理函数执行完后,不就还处在异常处理器模式下吗,没有返回原处理器模式?求解疑,不胜感激。
MACRO
$HandlerLabel HANDLER $HandleLabel
$HandlerLabel
sub sp,sp,#4 ;decrement sp(to store jump address)
stmfd sp!,{r0} ;PUSH the work register to stack(lr does not push because it return to original address)
ldr r0,=$HandleLabel;load the address of HandleXXX to r0
ldr r0,[r0] ;load the contents(service routine start address) of HandleXXX
str r0,[sp,#4] ;store the contents(ISR) of HandleXXX to stack
ldmfd sp!,{r0,pc} ;POP the work register and pc(jump to ISR)
MEND
UDF_INS_HANDLER HANDLER UdfInsVector
SWI_SVC_HANDLER HANDLER SwiSvcVector
INS_ABT_HANDLER HANDLER InsAbtVector
DAT_ABT_HANDLER HANDLER DatAbtVector
IRQ_SVC_HANDLER HANDLER IrqSvcVector
FIQ_SVC_HANDLER HANDLER FiqSvcVector |