05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Note<br />

Table C5-2 on page C5-10 does not:<br />

Debug State<br />

Include instructions that only update the CPSR bits that are available in the APSR, that is the N, Z,<br />

C, V, Q, <strong>and</strong> GE[3:0] bits. These instructions have their normal behavior when executed in Debug<br />

state.<br />

Include instructions that cause exceptions, such as SVC, SMC, <strong>and</strong> memory access instructions that<br />

cause aborts. The behavior of these instructions is described in Exceptions in Debug state on<br />

page C5-20.<br />

Show what values can be written to the CPSR. For more information, see Altering CPSR privileged<br />

bits in Debug state on page C5-14.<br />

MRS <strong>and</strong> MSR instructions in Debug state, in v6.1 Debug <strong>and</strong> v7 Debug<br />

In v6.1 Debug <strong>and</strong> v7 Debug, if the debugger has to update bits in the CPSR that are not available in the<br />

APSR then it must use the MSR instruction to do so, writing to CPSR_fsxc. The behavior of the CPSR forms<br />

of the MSR <strong>and</strong> MRS instructions in Debug state differs from their behavior in Non-debug state. In the CPSR:<br />

in Non-debug state:<br />

— the execution state bits, other than the E bit, are RAZ when read by an MRS instruction<br />

— writes to the execution state bits, other than the E bit, by an MSR instruction are ignored<br />

in Debug state:<br />

— the execution state bits return their correct values when read by an MRS instruction<br />

— writes to the execution state bits by an MSR instruction update the execution state bits.<br />

MRS <strong>and</strong> MSR instructions that read <strong>and</strong> write an SPSR behave as they do in Non-debug state.<br />

In addition, in Debug state in v6.1 Debug <strong>and</strong> v7 Debug:<br />

if you use an MSR instruction to directly modify the execution state bits of the CPSR, you must then<br />

perform an Instruction Synchronization Barrier (ISB) operation<br />

an MSR instruction that does not write to all fields of the CPSR is UNPREDICTABLE<br />

if an MRS instruction reads the CPSR after an MSR writes the execution state bits, <strong>and</strong> before an ISB,<br />

the value returned is UNKNOWN<br />

if the processor leaves Debug state after an MSR writes the execution state bits, <strong>and</strong> before an ISB, the<br />

behavior of the processor is UNPREDICTABLE.<br />

<strong>ARM</strong> DDI 0406B Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. C5-11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!