EasyManua.ls Logo

ARM Cortex-R4 - 3.2 Modes of operation and execution

Default Icon
436 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Programmers Model
ARM DDI 0363G Copyright © 2006-2011 ARM Limited. All rights reserved. 3-3
ID073015 Non-Confidential
3.2 Modes of operation and execution
This section describes:
Instruction set states
Operating modes.
3.2.1 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.
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 3-14.
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.
3.2.2 Operating modes
In each state there are seven modes of operation:
User (USR) mode is the usual mode for the execution of ARM or Thumb programs. It is
used for executing most application programs.
Fast interrupt (FIQ) mode is entered on taking a fast interrupt.
Interrupt (IRQ) mode is entered on taking a normal interrupt.
Supervisor (SVC) mode is a protected mode for the operating system and is entered on
taking a Supervisor Call (
SVC
), formerly
SWI
.
Abort (ABT) mode is entered after a data or instruction abort.
System (SYS) mode is a privileged user mode for the operating system.
Undefined (UND) mode is entered when an Undefined Instruction exception occurs.
Modes other than User mode are collectively known as Privileged modes. Privileged modes are
used to service interrupts or exceptions, or access protected resources.

Table of Contents

Related product manuals