Copyright © 2000, 2001 ARM Limited. All rights reserved.
ARM DUI 0068B
ARM
®
Developer Suite
Version 1.2
Assembler Guide
ii Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B
ARM Developer Suite
Assembler Guide
Copyright © 2000, 2001 ARM Limited. All rights reserved.
Release Information
The following changes have been made to this book.
Proprietary Notice
Words and logos marked with
®
or
™
are registered trademarks or trademarks owned by ARM Limited. Other
brands and names mentioned herein may be the trademarks of their respective owners.
Neither the whole nor any part of the information contained in, or the product described in, this document
may be adapted or reproduced in any material form except with the prior written permission of the copyright
holder.
The product described in this document is subject to continuous developments and improvements. All
particulars of the product and its use contained in this document are given by ARM in good faith. However,
all warranties implied or expressed, including but not limited to implied warranties of merchantability, or
fitness for purpose, are excluded.
This document is intended only to assist the reader in the use of the product. ARM Limited shall not be liable
for any loss or damage arising from the use of any information in this document, or any error or omission in
such information, or any incorrect use of the product.
Change History
Date Issue Change
November 2000 A Release 1.1
November 2001 B Release 1.2
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. iii
Contents
ARM Developer Suite Assembler Guide
Preface
About this book .............................................................................................. vi
Feedback ....................................................................................................... ix
Chapter 1 Introduction
1.1 About the ARM Developer Suite assemblers .............................................. 1-2
Chapter 2 Writing ARM and Thumb Assembly Language
2.1 Introduction ................................................................................................. 2-2
2.2 Overview of the ARM architecture .............................................................. 2-3
2.3 Structure of assembly language modules ................................................. 2-12
2.4 Using the C preprocessor ......................................................................... 2-19
2.5 Conditional execution ................................................................................ 2-20
2.6 Loading constants into registers ............................................................... 2-25
2.7 Loading addresses into registers .............................................................. 2-30
2.8 Load and store multiple register instructions ............................................. 2-39
2.9 Using macros ............................................................................................ 2-48
2.10 Describing data structures with MAP and FIELD directives ...................... 2-51
2.11 Using frame directives ............................................................................... 2-66
Chapter 3 Assembler Reference
3.1 Command syntax ........................................................................................ 3-2
Contents
iv Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B
3.2 Format of source lines ................................................................................ 3-8
3.3 Predefined register and coprocessor names .............................................. 3-9
3.4 Built-in variables ....................................................................................... 3-10
3.5 Symbols .................................................................................................... 3-12
3.6 Expressions, literals, and operators ......................................................... 3-18
Chapter 4 ARM Instruction Reference
4.1 Conditional execution ................................................................................. 4-4
4.2 ARM memory access instructions .............................................................. 4-6
4.3 ARM general data processing instructions ............................................... 4-23
4.4 ARM multiply instructions ......................................................................... 4-39
4.5 ARM saturating arithmetic instructions ..................................................... 4-54
4.6 ARM branch instructions .......................................................................... 4-56
4.7 ARM coprocessor instructions .................................................................. 4-61
4.8 Miscellaneous ARM instructions ............................................................... 4-70
4.9 ARM pseudo-instructions ......................................................................... 4-76
Chapter 5 Thumb Instruction Reference
5.1 Thumb memory access instructions ........................................................... 5-4
5.2 Thumb arithmetic instructions ................................................................... 5-15
5.3 Thumb general data processing instructions ............................................ 5-22
5.4 Thumb branch instructions ....................................................................... 5-31
5.5 Thumb software interrupt and breakpoint instructions .............................. 5-37
5.6 Thumb pseudo-instructions ...................................................................... 5-39
Chapter 6 Vector Floating-point Programming
6.1 The vector floating-point coprocessor ........................................................ 6-4
6.2 Floating-point registers ............................................................................... 6-5
6.3 Vector and scalar operations ..................................................................... 6-7
6.4 VFP and condition codes ............................................................................ 6-8
6.5 VFP system registers ............................................................................... 6-10
6.6 Flush-to-zero mode .................................................................................. 6-13
6.7 VFP instructions ....................................................................................... 6-15
6.8 VFP pseudo-instruction ............................................................................ 6-36
6.9 VFP directives and vector notation ........................................................... 6-37
Chapter 7 Directives Reference
7.1 Alphabetical list of directives ...................................................................... 7-2
7.2 Symbol definition directives ........................................................................ 7-3
7.3 Data definition directives .......................................................................... 7-13
7.4 Assembly control directives ...................................................................... 7-26
7.5 Frame description directives ..................................................................... 7-33
7.6 Reporting directives .................................................................................. 7-44
7.7 Miscellaneous directives ........................................................................... 7-49
Glossary