| |||
| Home > ARM Instruction Reference > Miscellaneous ARM instructions > MRS | |||
Move the contents of the CPSR or SPSR to a general-purpose register.
MRS{cond}Rd,psr
where:
condis an optional condition code (see Conditional execution).
Rdis the destination register. must
not be r15.Rd
psris either CPSR or SPSR.
Use MRS in combination with MSR as part
of a read-modify-write sequence for updating a PSR, for example
to change processor mode, or to clear the Q flag.
You must not attempt to access the SPSR when the processor is in User or System mode. This is your responsibility. The assembler cannot warn you about this because it does not know in what processor mode the code will be executed.