ARM Instruction Reference
ARM DUI 0068B
Copyright © 2000, 2001 ARM Limited. All rights reserved.
4-73
4.8.2
MRS
Move the contents of the CPSR or SPSR to a general-purpose register.
Syntax
MRS{
cond
}
Rd
,
psr
where:
cond
is an optional condition code (see
Conditional execution
on page 4-4).
Rd
is the destination register.
Rd
must not be r15.
psr
is either CPSR or SPSR.
Usage
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.
Caution
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 as it does not
know what processor mode code will be executed in.
Condition flags
This instruction does not affect the flags.
Architectures
This instruction is available in ARM architecture versions 3 and above.
Example
MSR r3, SPSR
Содержание Developer Suite
Страница 10: ...Preface x Copyright 2000 2001 ARM Limited All rights reserved ARM DUI 0068B ...
Страница 110: ...Assembler Reference 3 32 Copyright 2000 2001 ARM Limited All rights reserved ARM DUI 0068B ...
Страница 185: ...ARM Instruction Reference ARM DUI 0068B Copyright 2000 2001 ARM Limited All rights reserved 4 75 Example MSR CPSR_f r5 ...
Страница 238: ...Thumb Instruction Reference 5 44 Copyright 2000 2001 ARM Limited All rights reserved ARM DUI 0068B ...
Страница 282: ...Vector Floating point Programming 6 44 Copyright 2000 2001 ARM Limited All rights reserved ARM DUI 0068B ...
Страница 360: ...Index Index 6 Copyright 2000 2001 ARM Limited All rights reserved ARM DUI 0068B ...