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.

ThumbEE<br />

A9.1 The ThumbEE instruction set<br />

In general, instructions in ThumbEE are identical to Thumb instructions, with the following exceptions:<br />

A small number of instructions are affected by modifications to transitions from ThumbEE state. For<br />

more information, see ThumbEE state transitions.<br />

A substantial number of instructions have a null check on the base register before any other operation<br />

takes place, but are identical (or almost identical) in all other respects. For more information, see Null<br />

checking on page A9-3.<br />

A small number of instructions are modified in additional ways. See Instructions with modifications<br />

on page A9-4.<br />

Three Thumb instructions, BLX (immediate), 16-bit LDM, <strong>and</strong> 16-bit STM, are removed in ThumbEE<br />

state.<br />

The encoding corresponding to BLX (immediate) in Thumb is UNDEFINED in ThumbEE state.<br />

16-bit LDM <strong>and</strong> STM are replaced by new instructions, for details see Additional ThumbEE instructions<br />

on page A9-14.<br />

Two new 32-bit instructions, ENTERX <strong>and</strong> LEAVEX, are introduced in both the Thumb instruction set <strong>and</strong><br />

the ThumbEE instruction set. See Additional instructions in Thumb <strong>and</strong> ThumbEE instruction sets on<br />

page A9-7. These instructions use previously UNDEFINED encodings.<br />

A9.1.1 ThumbEE state transitions<br />

Instruction set state transitions to ThumbEE state can occur implicitly as part of a return from exception, or<br />

explicitly on execution of an ENTERX instruction.<br />

Instruction set state transitions from ThumbEE state can only occur due to an exception, or due to a<br />

transition to Thumb state using the LEAVEX instruction. Return from exception instructions (RFE <strong>and</strong> SUBS PC,<br />

LR, #imm) are UNPREDICTABLE in ThumbEE state.<br />

Any other Thumb instructions that can update the PC in ThumbEE state are UNPREDICTABLE if they attempt<br />

to change to <strong>ARM</strong> state. Interworking of <strong>ARM</strong> <strong>and</strong> Thumb instructions is not supported in ThumbEE state.<br />

The instructions affected are:<br />

LDR, LDM, <strong>and</strong> POP instructions that write to the PC, if bit [0] of the value loaded to the PC is 0<br />

BLX (register), BX, <strong>and</strong> BXJ, where Rm bit [0] == 0.<br />

Note<br />

SVC, BKPT, <strong>and</strong> UNDEFINED instructions cause an exception to occur.<br />

If a BXJ instruction is executed in ThumbEE state, with Rm bit[0] == 1, it does not enter Jazelle state.<br />

Instead, it behaves like the corresponding BX instruction <strong>and</strong> remains in ThumbEE state.<br />

Debug state is a special case. For the rules governing changes to CPSR state bits <strong>and</strong> Debug state, see<br />

Executing instructions in Debug state on page C5-9.<br />

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

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

Saved successfully!

Ooh no, something went wrong!