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.

<strong>ARM</strong>v6 Differences<br />

<strong>ARM</strong>v6T2 supports the full Thumb instruction set, apart from a few instructions that are introduced in<br />

<strong>ARM</strong>v7.<br />

Interworking<br />

In <strong>ARM</strong>v6, the instructions that provide interworking branches between <strong>ARM</strong> <strong>and</strong> Thumb states are:<br />

BL <strong>and</strong> BLX<br />

LDR, LDM, <strong>and</strong> POP instructions that load the PC.<br />

In <strong>ARM</strong>v7, the following <strong>ARM</strong> instructions also perform interworking branches if their destination register<br />

is the PC <strong>and</strong> the ’S’ option is not specified:<br />

ADC, ADD, AND, ASR, BIC, EOR, LSL, LSR, MOV, MVN, ORR, ROR, RRX, RSB, RSC, SBC, <strong>and</strong> SUB.<br />

The instructions do not perform interworking branches in <strong>ARM</strong>v6, <strong>and</strong> the corresponding Thumb<br />

instructions do not perform interworking branches in either <strong>ARM</strong>v6 or <strong>ARM</strong>v7. This functionality is<br />

described by the ALUWritePC() pseudocode function. See Pseudocode details of operations on <strong>ARM</strong> core<br />

registers on page A2-12.<br />

BL <strong>and</strong> BLX (immediate) instructions, before <strong>ARM</strong>v6T2<br />

In <strong>ARM</strong>v4T, <strong>ARM</strong>v5T, <strong>ARM</strong>v5TE, <strong>ARM</strong>v5TEJ, <strong>ARM</strong>v6, <strong>and</strong> <strong>ARM</strong>v6K, the BL <strong>and</strong> BLX (immediate)<br />

instructions are the only 32-bit Thumb instructions, <strong>and</strong> the maximum range of the branches that they<br />

specify is restricted to approximately +/-4MB. This means that each of the two halfwords of these<br />

instructions has top five bits 0b11101, 0b11110, or 0b11111, <strong>and</strong> makes it possible to execute the two<br />

halfwords as separate 16-bit instructions.<br />

The following descriptions use the format described in Instruction encodings on page A8-2, except that<br />

they:<br />

name the encodings H1, H2 <strong>and</strong> H3<br />

have pseudocode that defines the entire operation of the instruction, instead of separate<br />

encoding-specific pseudocode <strong>and</strong> Operation pseudocode.<br />

When the two halfwords of a BL or BLX (immediate) instruction are executed separately, their behavior is as<br />

follows:<br />

Encoding H1 <strong>ARM</strong>v4T, <strong>ARM</strong>v5T*, <strong>ARM</strong>v6, <strong>ARM</strong>v6K Used for BL <strong>and</strong> BLX<br />

BL{X} First of two 16-bit instructions<br />

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

1 1 1 1 0 imm11<br />

LR = PC + SignExtend(imm11:Zeros(12), 32);<br />

AppxG-4 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!