12.8.4. Writing to the CPSR in debug state

The only instruction that can update the CPSR while in debug state is the MSR instruction. All other ARMv7 instructions that write to the CPSR are Unpredictable, that is, the BX, BXJ, SETEND, CPS, RFE, LDM(exception return), and data processing instructions with Rd==R15 and S==1.

The behavior of the CPSR forms of the MSR and MRS instructions in debug state is different to their behavior in normal state:

The debugger must execute an ISB sequence after it writes to the CPSR execution state bits using an MSR instruction. If the debugger reads the CPSR using an MRS instruction after a write to any of these bits, but before an ISB sequence, the value that MRS returns is Unpredictable. Similarly, if the debugger forces the processor to leave debug state after an MSR writes to the execution state bits, but before any ISB sequence, the behavior of the processor is Unpredictable.

Copyright © 2010-2011 ARM. All rights reserved.ARM DDI 0460C