Thumb Instruction Reference
ARM DUI 0068B
Copyright © 2000, 2001 ARM Limited. All rights reserved.
5-37
5.5
Thumb software interrupt and breakpoint instructions
This section contains the following subsections:
•
SWI
•
BKPT
on page 5-38.
5.5.1
SWI
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