4.8.3. MSR

Load specified fields of the CPSR or SPSR with an immediate constant, or from the contents of a general-purpose register.

Syntax

MSR{cond} <psr>_<fields>, #immed_8r
MSR{cond} <psr>_<fields>, Rm

where:

cond

is an optional condition code (see Conditional execution).

<psr>

is either CPSR or SPSR.

<fields>

specifies the field or fields to be moved. <fields> canbe one or more of:

c

control field mask byte (PSR[7:0])

x

extension field mask byte (PSR[15:8])

s

status field mask byte (PSR[23:16)

f

flags field mask byte (PSR[31:24]).

immed_8r

is an expression evaluating to a numeric constant. The constant must correspond to an 8-bit pattern rotated by an even number of bits within a 32-bit word.

Rm

is the source register.

Usage

See MRS.

Condition flags

This instruction updates the flags explicitly if the f field is specified.

Architectures

This instruction is available in ARM architecture versions 3 and above.

Example

    MSR CPSR_f, r5
Copyright © 2000, 2001 ARM Limited. All rights reserved.ARM DUI 0068B
Non-Confidential