Writing ARM and Thumb Assembly Language
2-10 Copyright © 2000, 2001 ARM Limited. A ll rights reserved. ARM DUI 0068B
Refer to Chapter5 Thumb Instruction Reference for a complete list of the Thumb data
processing instructions that can access the high registers.
Access to the barrel shifter
In Thumb state you can use the barrel shifter only in a separate operation, using an
LSL
,
LSR
,
ASR,
or
ROR
instruction.
2.2.9 Differences between Thumb and ARM instruction sets
The general differences between the Thumb instruction set and the ARM instruction set
are dealt with under the following headings:
Branch instructions
Data processing instructions
Single register load and store instructions on page2-11
Multiple register load and store instructions on page2-11.
There are no Thumb coprocessor instructions, no Thumb semaphore instructions, and
no Thumb instructions to access the CPSR or SPSR.
Branch instructions
These instructions are used to :
branch backwards to form loops
branch forward in conditional structures
branch to subroutines
change the processor f rom Thumb state to AR M state.
Program-relative branches, particularly conditional branches, are more limited in range
than in ARM code, and branches to subroutines can only be unconditional.
Data processing instructions
These operate on the general- purpose registers. In many cases, th e result of the
operation must be put in one of the operand registers, not in a third register. There are
fewer data processing ope rations available th an in ARM state. They have limited acc ess
to registers r8 to r15.
The ALU status flags in the CPSR are always updated by these instructions except when
MOV
or
ADD
instructions access registers r8 to r15. Thumb data processing instructions
that access registers r8 to r15 cannot update the flags.