Showing changes from revision #5 to #6:
Added | Removed | Changed
Entry | |
---|---|
- | - |
Exit | |
---|---|
All registers preserved |
The purpose of this call is to set the processor to Supervisor mode.
Interrupt and Fast Interrupt status is unaltered. Note that SWI calls while in SVC mode will alter R14, and will use R13 as stack.
To return to User mode on an ARM6 or later:
MSR CPSR_c,#%10000 ; USR32
alternatively to return to either USR32 or USR26
MRS R14,CPSR BIC R14,R14,#%1111 ; Only sets usermode MSR CPSR_c,R14
To return to User mode pre ARM6 (deprecated):
TEQP PC,#0 MOV R0,R0 ; Anything that doesn't use banked R8-R14
alternatively to return to user mode leaving the other PSR bits constant
BIC R14,PC,#%11 ; Only sets usermode TEQP R14,#0 MOV R0,R0 ; Anything that doesn't use banked R8-R14