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.

Thumb Instruction Set Encoding<br />

A6.1 Thumb instruction set encoding<br />

The Thumb instruction stream is a sequence of halfword-aligned halfwords. Each Thumb instruction is<br />

either a single 16-bit halfword in that stream, or a 32-bit instruction consisting of two consecutive halfwords<br />

in that stream.<br />

If bits [15:11] of the halfword being decoded take any of the following values, the halfword is the first<br />

halfword of a 32-bit instruction:<br />

0b11101<br />

0b11110<br />

0b11111.<br />

Otherwise, the halfword is a 16-bit instruction.<br />

For details of the encoding of 16-bit Thumb instructions see 16-bit Thumb instruction encoding on<br />

page A6-6.<br />

For details of the encoding of 32-bit Thumb instructions see 32-bit Thumb instruction encoding on<br />

page A6-14.<br />

A6.1.1 UNDEFINED <strong>and</strong> UNPREDICTABLE instruction set space<br />

An attempt to execute an unallocated instruction results in either:<br />

Unpredictable behavior. The instruction is described as UNPREDICTABLE.<br />

An Undefined Instruction exception. The instruction is described as UNDEFINED.<br />

An instruction is UNDEFINED if it is declared as UNDEFINED in an instruction description, or in this chapter.<br />

An instruction is UNPREDICTABLE if:<br />

a bit marked (0) or (1) in the encoding diagram of an instruction is not 0 or 1 respectively, <strong>and</strong> the<br />

pseudocode for that encoding does not indicate that a different special case applies<br />

it is declared as UNPREDICTABLE in an instruction description or in this chapter.<br />

Unless otherwise specified:<br />

Thumb instructions introduced in an architecture variant are either UNPREDICTABLE or UNDEFINED in<br />

earlier architecture variants.<br />

A Thumb instruction that is provided by one or more of the architecture extensions is either<br />

UNPREDICTABLE or UNDEFINED in an implementation that does not include any of those extensions.<br />

In both cases, the instruction is UNPREDICTABLE if it is a 32-bit instruction in an architecture variant before<br />

<strong>ARM</strong>v6T2, <strong>and</strong> UNDEFINED otherwise.<br />

A6-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!