You copied the Doc URL to your clipboard.

CPS

Change Processor State.

Syntax

CPSeffect iflags{, #mode}

CPS #mode

where:

effect

is one of:

IE
Interrupt or abort enable.
ID
Interrupt or abort disable.
iflags

is a sequence of one or more of:

a
Enables or disables imprecise aborts.
i
Enables or disables IRQ interrupts.
f
Enables or disables FIQ interrupts.
mode
specifies the number of the mode to change to.

Usage

Changes one or more of the mode, A, I, and F bits in the CPSR, without changing the other CPSR bits.

CPS is only permitted in privileged software execution, and has no effect in User mode.

CPS cannot be conditional, and is not permitted in an IT block.

Condition flags

This instruction does not change the condition flags.

16-bit instructions

The following forms of these instructions are available in T32 code, and are 16-bit instructions:

  • CPSIE iflags.
  • CPSID iflags.

You cannot specify a mode change in a 16-bit T32 instruction.

Architectures

This instruction is available in A32 and T32.

In T32, 16-bit and 32-bit versions of this instruction are available.

Examples

    CPSIE if      ; Enable IRQ and FIQ interrupts.
    CPSID A       ; Disable imprecise aborts.
    CPSID ai, #17 ; Disable imprecise aborts and interrupts, and enter
                  ; FIQ mode.
    CPS #16       ; Enter User mode.
Was this page helpful? Yes No