ARM Instruction Reference

4.8.3MSR

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 on page 4-4).

<psr>

is either CPSR or SPSR.

<fields>

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

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

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

sstatus field mask byte (PSR[23:16)

fflags 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 on page 4-73.

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.

4-74

Copyright © 2000, 2001 ARM Limited. All rights reserved.

ARM DUI 0068B

Page 184
Image 184
ARM VERSION 1.2 manual 3 MSR, Is either Cpsr or Spsr, See MRS on