2 instruction set states, 1 switching state, 2 interworking arm and thumb state – ARM Cortex R4F User Manual

Page 49: Instruction set states -3

Advertising
background image

Programmer’s Model

ARM DDI 0363E

Copyright © 2009 ARM Limited. All rights reserved.

2-3

ID013010

Non-Confidential, Unrestricted Access

2.2

Instruction set states

The processor has two instruction set states:

ARM state

The processor executes 32-bit, word-aligned ARM instructions in this
state.

Thumb state

The processor executes 32-bit and 16-bit halfword-aligned Thumb
instructions in this state.

Note

Transition between ARM state and Thumb state does not affect the processor mode or the
register contents.

2.2.1

Switching state

The instruction set state of the processor can be switched between ARM state and Thumb state:

Using the

BX

and

BLX

instructions, by a load to the PC, or with a data-processing instruction

that does not set flags, with the PC as the destination register. Switching state is described
in the ARM Architecture Reference Manual.

Note

When

the

BXJ

instruction is used the processor invokes the

BX

instruction.

Automatically on an exception. You can write an exception handler routine in ARM or
Thumb code. For more information, see Exceptions on page 2-16.

2.2.2

Interworking ARM and Thumb state

The processor enables you to mix ARM and Thumb code. For more information about
interworking ARM and Thumb, see the RealView Compilation Tools Developer Guide.

Advertising
This manual is related to the following products: