I am writing an assembly FIQ ISR using GCC complier. I want to change return address in FIQ ISR so that after ISR, it returns to the requested address. the reason for doing that is because i am writing a RTOS.
what are the instruction for ISR return in assembly? is it
SUBS PC, R14, #4
? i know in 8051, noraml function call return is RET, ISR return is RETI.
You mean if it is
LDMFD R13!, {R0-R7,R14}
the CPSR will remain the same.
But if it is:
LDMFD R13!, {R0-R7,PC}
the CPSR will replaced by SPSR_IRQ.
I have tried the second one, CPSR still remains the same, still in FIQ mode.
Change
to
LDMFD R13!, {R0-R7,PC}^