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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C5.4 Executing instructions in Debug state<br />

Debug State<br />

In Debug state the processor executes instructions issued through the Instruction Transfer Register, see<br />

Instruction Transfer Register (DBGITR) on page C10-46. This mechanism is enabled through<br />

DBGDSCR[13], see Debug Status <strong>and</strong> Control Register (DBGDSCR) on page C10-10.<br />

The following rules <strong>and</strong> restrictions apply to instructions that can be executed in this manner in Debug state:<br />

The processor instruction set state always corresponds to the state indicated by the CPSR.J <strong>and</strong><br />

CPSR.T execution state bits. However, the processor always interprets the instructions issued through<br />

the DBGITR as <strong>ARM</strong> instruction set opcodes, regardless of the setting of the CPSR.J <strong>and</strong> CPSR.T<br />

execution state bits.<br />

Some <strong>ARM</strong> instructions are UNPREDICTABLE if executed in Debug state. These instructions are<br />

either:<br />

— identified as UNPREDICTABLE in this list<br />

— shown as UNPREDICTABLE in Table C5-2 on page C5-10.<br />

Otherwise, except for the value read from the PC, instructions executed in Debug state operate as<br />

specified for <strong>ARM</strong> state. Behavior of the PC <strong>and</strong> CPSR in Debug state on page C5-7 specifies the<br />

value read from the PC.<br />

The CPSR.IT execution state bits are ignored. This means that instructions issued through the<br />

DBGITR do not fail their condition tests unexpectedly. However, the condition code field in an <strong>ARM</strong><br />

instruction is honored.<br />

The CPSR.IT execution state bits are preserved <strong>and</strong> do not change when instructions are executed,<br />

unless an instruction that modifies those bits explicitly is executed.<br />

The branch instructions B, BL, BLX (immediate), <strong>and</strong> BLX (register) are UNPREDICTABLE in Debug state.<br />

The hint instructions WFI, WFE <strong>and</strong> YIELD are UNPREDICTABLE in Debug state.<br />

All memory read <strong>and</strong> memory write instructions with the PC as the base address register read an<br />

UNKNOWN value for the base address.<br />

Certain instructions that normally update the CPSR can be UNPREDICTABLE in Debug state, see<br />

Writing to the CPSR in Debug state on page C5-10.<br />

Instructions that load a value from memory into the PC are UNPREDICTABLE in Debug state.<br />

Conditional instructions that write explicitly to the PC are UNPREDICTABLE in Debug state.<br />

There are additional restrictions on data-processing instructions that write to the PC. See<br />

Data-processing instructions with the PC as the target in Debug state on page C5-12.<br />

The exception-generating instructions SVC, SMC <strong>and</strong> BKPT are UNPREDICTABLE in Debug state.<br />

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

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

Saved successfully!

Ooh no, something went wrong!