Thumb Instruction Reference

5.5Thumb software interrupt and breakpoint instructions

This section contains the following subsections:

SWI

BKPT on page 5-38.

5.5.1SWI

Software interrupt.

Syntax

SWI immed_8

where:

immed_8 is a numeric expression evaluating to an integer in the range 0-255.

Usage

The SWI instruction causes a SWI exception. This means that the processor state changes to ARM, the processor mode changes to Supervisor, the CPSR is saved to the Supervisor Mode SPSR, and execution branches to the SWI vector (see the Handling Processor Exceptions chapter in ADS Developer Guide).

immed_8 is ignored by the processor. However, it is present in bits[7:0] of the instruction opcode. It can be retrieved by the exception handler to determine what service is being requested.

Condition flags

This instruction does not affect the flags.

Architectures

This instruction is available in all T variants of the ARM architecture.

Example

SWI 12

ARM DUI 0068B

Copyright © 2000, 2001 ARM Limited. All rights reserved.

5-37

Page 231
Image 231
ARM VERSION 1.2 manual Thumb software interrupt and breakpoint instructions, Bkpt on