Arm VERSION 1.2 Manuel d'utilisateur

Naviguer en ligne ou télécharger Manuel d'utilisateur pour Matériel Arm VERSION 1.2. ARM VERSION 1.2 User Manual Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 360
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs

Résumé du contenu

Page 1 - Developer Suite

Copyright © 2000, 2001 ARM Limited. All rights reserved.ARM DUI 0068BARM® Developer SuiteVersion 1.2Assembler Guide

Page 2 - ARM Developer Suite

Preface x Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B

Page 3 - Contents

Assembler Reference 3-22 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.6.5 Floating-point literalsFloating-point literals ca

Page 4

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-233.6.6 Register-relative and program-relative expression

Page 5 - • Feedback on page ix

Assembler Reference 3-24 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.6.9 Operator precedenceThe assembler includes an exte

Page 6 - About this book

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-25The highest precedence operators are at the top of the

Page 7

Assembler Reference 3-26 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.6.10 Unary operatorsUnary operators have the highest

Page 8

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-27Example of use of :SB_OFFSET_19_12: and :SB_OFFSET_11_

Page 9 - Feedback

Assembler Reference 3-28 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.6.11 Binary operatorsBinary operators are written bet

Page 10 - Preface

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-29Shift operatorsShift operators act on numeric expressio

Page 11 - Chapter 1

Assembler Reference 3-30 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BRelational operatorsTable 3-9 shows the relational oper

Page 12

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-31Boolean operatorsThese are the operators with the lowes

Page 13 - Chapter 2

ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 1-1Chapter 1 IntroductionThis chapter introduces the assemblers provided with A

Page 14 - 2.1 Introduction

Assembler Reference 3-32 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B

Page 15

ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-1Chapter 4 ARM Instruction ReferenceThis chapter describes the ARM instructio

Page 16

ARM Instruction Reference 4-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BTable 4-1 Location of ARM instructionsMnemonic Bri

Page 17 - MOV pc,lr

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-3MULMultiply page 4-40 2MVNMove not page 4-32 AllOR

Page 18

ARM Instruction Reference 4-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.1 Conditional executionAlmost all ARM instructio

Page 19

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-5Some instructions update a subset of the flags. Th

Page 20

ARM Instruction Reference 4-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.2 ARM memory access instructionsThis section con

Page 21

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-74.2.1 LDR and STR, words and unsigned bytesLoad re

Page 22

ARM Instruction Reference 4-8 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BFlexOffsetis a flexible offset applied to the valu

Page 23

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-9Flexible offset syntaxBoth pre-indexed and post-in

Page 24

Introduction 1-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B1.1 About the ARM Developer Suite assemblersARM Developer Suite

Page 25

ARM Instruction Reference 4-10 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BAddress alignment for word transfersIn most circu

Page 26

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-11Saving from r15In general, avoid saving from r15

Page 27 - Example 2-1

ARM Instruction Reference 4-12 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.2.2 LDR and STR, halfwords and signed bytesLoad

Page 28

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-13labelis a program-relative expression. See Regist

Page 29 - Example 2-2

ARM Instruction Reference 4-14 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BRmis a register containing a value to be used as

Page 30 - Example 2-3

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-154.2.3 LDR and STR, doublewordsLoad two consecutiv

Page 31 - 2.4 Using the C preprocessor

ARM Instruction Reference 4-16 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BZero offsetThe value in Rn is used as the address

Page 32 - 2.5 Conditional execution

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-17If your system has a system coprocessor, you can

Page 33

ARM Instruction Reference 4-18 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.2.4 LDM and STMLoad and store multiple register

Page 34

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-19Non word-aligned addressesThese instructions igno

Page 35 - BNE gcd

ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-1Chapter 2 Writing ARM and Thumb Assembly LanguageThis chapter provides an in

Page 36

ARM Instruction Reference 4-20 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.2.5 PLDCache preload.SyntaxPLD [Rn{, FlexOffset

Page 37

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-21UsageUse PLD to hint to the memory system that th

Page 38

ARM Instruction Reference 4-22 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.2.6 SWPSwap data between registers and memory.U

Page 39

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-234.3 ARM general data processing instructionsThis

Page 40 - Example 2-5

ARM Instruction Reference 4-24 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.3.1 Flexible second operandMost ARM general dat

Page 41 - pseudo-instructions

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-25ASRArithmetic shift right by n bits divides the v

Page 42 - , where the

ARM Instruction Reference 4-26 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BFigure 4-2 RRXThe carry flagThe carry flag is upd

Page 43 - Example 2-6

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-274.3.2 ADD, SUB, RSB, ADC, SBC, and RSCAdd, subtra

Page 44

ARM Instruction Reference 4-28 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BCondition flagsIf S is specified, these instructi

Page 45

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-29 ADDS r4,r0,r2 ; adding the least signif

Page 46

Writing ARM and Thumb Assembly Language 2-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.1 IntroductionThis chapter gives a

Page 47 - Example 2-9

ARM Instruction Reference 4-30 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.3.3 AND, ORR, EOR, and BICLogical AND, OR, Excl

Page 48

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-31Use of r15If you use r15 as Rn, the value used is

Page 49 - Example 2-10 String copy

ARM Instruction Reference 4-32 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.3.4 MOV and MVNMove and Move Not.SyntaxMOV{cond

Page 50

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-33Use of r15If you use r15 as Rn, the value used is

Page 51 - -checkreglist

ARM Instruction Reference 4-34 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.3.5 CMP and CMNCompare and Compare Negative.Syn

Page 52

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-35ArchitecturesThese instructions are available in

Page 53

ARM Instruction Reference 4-36 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.3.6 TST and TEQTest and Test Equivalence.Syntax

Page 54 - STMEA (STMIA) LDMEA (LDMDB)

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-37ArchitecturesThese instructions are available in

Page 55 - ; code

ARM Instruction Reference 4-38 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.3.7 CLZCount Leading Zeroes.SyntaxCLZ{cond} Rd,

Page 56 - Example 2-11 Block copy

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-394.4 ARM multiply instructionsThis section contain

Page 57 - Example 2-12

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-32.2 Overview of the ARM architecture

Page 58

ARM Instruction Reference 4-40 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.4.1 MUL and MLAMultiply and multiply-accumulate

Page 59 - Example 2-13

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-41Examples MUL r10,r2,r5 MLA r10,r2,r

Page 60 - 2.9 Using macros

ARM Instruction Reference 4-42 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.4.2 UMULL, UMLAL, SMULL and SMLALUnsigned and s

Page 61 - Example 2-14

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-43Condition flagsIf S is specified, these instructi

Page 62 - Example 2-15

ARM Instruction Reference 4-44 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.4.3 SMULxySigned multiply (16-bit by 16-bit, 32

Page 63

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-45Incorrect examples SMULBT r15,r2,r0 ; u

Page 64 - Example 2-16

ARM Instruction Reference 4-46 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.4.4 SMLAxySigned multiply-accumulate (16-bit by

Page 65 - Example 2-17

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-47ArchitecturesThis instruction is available in all

Page 66 - Example 2-18

ARM Instruction Reference 4-48 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.4.5 SMULWySigned multiply (32-bit by 16-bit, to

Page 67 - Example 2-19

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-494.4.6 SMLAWySigned multiply-accumulate (32-bit by

Page 68 - Example 2-20

Writing ARM and Thumb Assembly Language 2-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.2.3 Processor modeARM processors s

Page 69 - Example 2-21

ARM Instruction Reference 4-50 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BArchitecturesThis instruction is available in all

Page 70

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-514.4.7 SMLALxySigned multiply-accumulate (16-bit b

Page 71

ARM Instruction Reference 4-52 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BExamples SMLALTB r2,r3,r7,r1 SMLALBTVS

Page 72 - Example 2-23

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-534.4.8 MIA, MIAPH, and MIAxyXScale coprocessor 0 i

Page 73 - Example 2-24

ARM Instruction Reference 4-54 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BThe MIAxy instruction multiplies the signed integ

Page 74 - Example 2-25

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-554.5 ARM saturating arithmetic instructionsThese o

Page 75 - Example 2-26

ARM Instruction Reference 4-56 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BNote All values are treated as two’s complement s

Page 76 - Example 2-27

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-574.6 ARM branch instructionsThis section contains

Page 77

ARM Instruction Reference 4-58 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.6.1 B and BLBranch, and Branch with Link.Syntax

Page 78 - 2.11 Using frame directives

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-594.6.2 BXBranch, and optionally exchange instructi

Page 79 - Chapter 3

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-5In User mode, r14 is used as a link

Page 80 - 3.1 Command syntax

ARM Instruction Reference 4-60 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.6.3 BLXBranch with Link, and optionally exchang

Page 81

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-61ArchitecturesThis instruction is available in all

Page 82

ARM Instruction Reference 4-62 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.7 ARM coprocessor instructionsThis section does

Page 83

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-634.7.1 CDP, CDP2Coprocessor data operations.Syntax

Page 84

ARM Instruction Reference 4-64 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.7.2 MCR, MCR2, MCRRMove to coprocessor from ARM

Page 85 - -via file

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-654.7.3 MRC, MRC2Move to ARM register from coproces

Page 86 - 3.2 Format of source lines

ARM Instruction Reference 4-66 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.7.4 MRRCMove to two ARM registers from coproces

Page 87

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-674.7.5 LDC, STCTransfer data between memory and co

Page 88 - 3.4 Built-in variables

ARM Instruction Reference 4-68 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BArchitecturesLDC and STC are available in ARM arc

Page 89

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-694.7.6 LDC2, STC2Transfer data between memory and

Page 90 - 3.5 Symbols

Writing ARM and Thumb Assembly Language 2-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.2.5 ARM instruction set overviewAl

Page 91

ARM Instruction Reference 4-70 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BArchitecturesLDC2 and STC2 are available in ARM a

Page 92

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-714.8 Miscellaneous ARM instructionsThis section co

Page 93

ARM Instruction Reference 4-72 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.8.1 SWISoftware interrupt.SyntaxSWI{cond} immed

Page 94

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-734.8.2 MRSMove the contents of the CPSR or SPSR to

Page 95

ARM Instruction Reference 4-74 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.8.3 MSRLoad specified fields of the CPSR or SPS

Page 96

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-75Example MSR CPSR_f, r5

Page 97

ARM Instruction Reference 4-76 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.8.4 BKPTBreakpoint.SyntaxBKPT immed_16where:imm

Page 98

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-774.8.5 MAR, MRAXScale coprocessor 0 instructions.T

Page 99

ARM Instruction Reference 4-78 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.9 ARM pseudo-instructionsThe ARM assembler supp

Page 100 - Assembler Reference

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-794.9.1 ADR ARM pseudo-instructionLoad a program-re

Page 101

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-7Single register load and store instr

Page 102

ARM Instruction Reference 4-80 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.9.2 ADRL ARM pseudo-instructionLoad a program-r

Page 103

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-81If expr is program-relative, it must evaluate to

Page 104 - 3.6.10 Unary operators

ARM Instruction Reference 4-82 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.9.3 LDR ARM pseudo-instructionLoad a register w

Page 105

ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-83UsageThe LDR pseudo-instruction is used for two m

Page 106

ARM Instruction Reference 4-84 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.9.4 NOP ARM pseudo-instructionNOP generates the

Page 107

ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-1Chapter 5 Thumb Instruction ReferenceThis chapter describes the Thumb instru

Page 108

Thumb Instruction Reference 5-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BTable 5-1 Location of Thumb instructions and pse

Page 109 - Logical OR of A and B

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-3RORRotate right page 5-24 4TSBCSubtract with car

Page 110

Thumb Instruction Reference 5-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.1 Thumb memory access instructionsThis section

Page 111 - ARM Instruction Reference

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-55.1.1 LDR and STR, immediate offsetLoad Register

Page 112

ii Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BARM Developer SuiteAssembler GuideCopyright © 2000, 2001 ARM Limited. All ri

Page 113

Writing ARM and Thumb Assembly Language 2-8 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.2.6 ARM instruction capabilitiesTh

Page 114 - 4.1 Conditional execution

Thumb Instruction Reference 5-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BAddress alignment for word and halfword transfer

Page 115

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-75.1.2 LDR and STR, register offsetLoad Register

Page 116

Thumb Instruction Reference 5-8 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BAddress alignment for word and halfword transfer

Page 117

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-95.1.3 LDR and STR, pc or sp relativeLoad Registe

Page 118

Thumb Instruction Reference 5-10 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BIf your system does not have a system coprocess

Page 119

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-115.1.4 PUSH and POPPush low registers, and optio

Page 120

Thumb Instruction Reference 5-12 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BPOP {reglist, pc}This instruction causes a bran

Page 121

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-135.1.5 LDMIA and STMIALoad and store multiple re

Page 122

Thumb Instruction Reference 5-14 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BExamples LDMIA r3!, {r0,r4} LDMIA r5!

Page 123

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-155.2 Thumb arithmetic instructionsThis section c

Page 124

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-92.2.7 Thumb instruction set overview

Page 125

Thumb Instruction Reference 5-16 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.2.1 ADD and SUB, low registersAdd and subtrac

Page 126

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-17Note An ADD instruction with a negative value f

Page 127

Thumb Instruction Reference 5-18 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.2.2 ADD, high or low registersAdd values in r

Page 128

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-195.2.3 ADD and SUB, spIncrement or decrement sp

Page 129

Thumb Instruction Reference 5-20 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.2.4 ADD, pc or sp relativeAdd an immediate co

Page 130

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-215.2.5 ADC, SBC, and MULAdd with carry, Subtract

Page 131

Thumb Instruction Reference 5-22 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.3 Thumb general data processing instructionsT

Page 132

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-235.3.1 AND, ORR, EOR, and BICBitwise logical ope

Page 133

Thumb Instruction Reference 5-24 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.3.2 ASR, LSL, LSR, and RORShift and rotate op

Page 134

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-25Register-controlled shiftThese instructions tak

Page 135 - Figure 4-1 ROR

Writing ARM and Thumb Assembly Language 2-10 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BRefer to Chapter 5 Thumb Instructio

Page 136 - Figure 4-2 RRX

Thumb Instruction Reference 5-26 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.3.3 CMP and CMNCompare and Compare Negative.S

Page 137

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-27Examples CMP r2,#255 CMP r7,r12 ; hi

Page 138

Thumb Instruction Reference 5-28 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.3.4 MOV, MVN, and NEGMove, Move NOT, and Nega

Page 139

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-29Condition flagsMOV Rd,#expr and MVN instruction

Page 140

Thumb Instruction Reference 5-30 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.3.5 TSTTest bits.SyntaxTST Rn, Rmwhere:Rnis t

Page 141

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-315.4 Thumb branch instructionsThis section conta

Page 142

Thumb Instruction Reference 5-32 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.4.1 BBranch. This is the only instruction in

Page 143

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-33Table 5-2 Condition codes for Thumb B instruct

Page 144

Thumb Instruction Reference 5-34 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.4.2 BLLong branch with Link.SyntaxBL labelwhe

Page 145 - Incorrect example

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-355.4.3 BXBranch, and optionally exchange instruc

Page 146

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-11Single register load and store inst

Page 147

Thumb Instruction Reference 5-36 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.4.4 BLXBranch with Link, and optionally excha

Page 148

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-375.5 Thumb software interrupt and breakpoint ins

Page 149 - 4.4 ARM multiply instructions

Thumb Instruction Reference 5-38 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.5.2 BKPTBreakpoint.SyntaxBKPT immed_8where:im

Page 150

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-395.6 Thumb pseudo-instructionsThe ARM assembler

Page 151 - Incorrect examples

Thumb Instruction Reference 5-40 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.6.1 ADR Thumb pseudo-instructionThe ADR pseud

Page 152

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-415.6.2 LDR Thumb pseudo-instructionThe LDR pseud

Page 153

Thumb Instruction Reference 5-42 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B• To load a program-relative or external addres

Page 154

Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-435.6.3 NOP Thumb pseudo-instructionNOP generates

Page 155

Thumb Instruction Reference 5-44 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B

Page 156

ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-1Chapter 6 Vector Floating-point ProgrammingThis chapter provides reference i

Page 157

Writing ARM and Thumb Assembly Language 2-12 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.3 Structure of assembly language

Page 158

Vector Floating-point Programming 6-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BTable 6-1 Location of descriptions of VFP

Page 159

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-3FNEGNegate page 6-16 Vector AllFNMACNegate

Page 160

Vector Floating-point Programming 6-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.1 The vector floating-point coprocessorT

Page 161

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-56.2 Floating-point registersThe Vector Flo

Page 162

Vector Floating-point Programming 6-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.2.2 VectorsA vector can use up to eight

Page 163

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-76.3 Vector and scalar operations You can u

Page 164

Vector Floating-point Programming 6-8 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.4 VFP and condition codesYou can use a c

Page 165

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-9Note The type of the instruction that last

Page 166

Vector Floating-point Programming 6-10 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.5 VFP system registersThree VFP system

Page 167 - 4.6 ARM branch instructions

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-11bits[18:16] LEN is the number of register

Page 168

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-13LabelsLabels are symbols that repre

Page 169

Vector Floating-point Programming 6-12 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.5.2 FPEXC, the floating-point exception

Page 170

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-136.6 Flush-to-zero modeSome implementation

Page 171

Vector Floating-point Programming 6-14 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.6.3 Operations not affected by flush-to

Page 172

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-156.7 VFP instructionsThis section contains

Page 173

Vector Floating-point Programming 6-16 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.1 FABS, FCPY, and FNEGFloating-point

Page 174

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-17Examples FABSD d3, d5 FNEGSMI s15

Page 175

Vector Floating-point Programming 6-18 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.2 FADD and FSUBFloating-point add and

Page 176

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-196.7.3 FCMPFloating-point compare.FCMP is

Page 177

Vector Floating-point Programming 6-20 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.4 FCVTDSConvert single-precision floa

Page 178

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-216.7.5 FCVTSDConvert double-precision floa

Page 179

Writing ARM and Thumb Assembly Language 2-14 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BConstantsConstants can be numeric,

Page 180

Vector Floating-point Programming 6-22 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.6 FDIVFloating-point divide. FDIV can

Page 181

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-236.7.7 FLD and FSTFloating-point load and

Page 182 - SWI 0x123456

Vector Floating-point Programming 6-24 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B FLDSNE s3, [r2, #72+count] FSTS

Page 183

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-256.7.8 FLDM and FSTMFloating-point load mu

Page 184

Vector Floating-point Programming 6-26 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BUsageThe FLDM instruction loads several c

Page 185 - MSR CPSR_f, r5

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-276.7.9 FMAC, FNMAC, FMSC, and FNMSCFloatin

Page 186

Vector Floating-point Programming 6-28 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B FNMSCSLE s6, s0, s26

Page 187

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-296.7.10 FMDRR and FMRRDTransfer contents b

Page 188 - 4.9 ARM pseudo-instructions

Vector Floating-point Programming 6-30 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.11 FMDHR, FMDLR, FMRDH, and FMRDLTran

Page 189

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-316.7.12 FMRS and FMSRTransfer contents bet

Page 190

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-152.3.2 An example ARM assembly langu

Page 191

Vector Floating-point Programming 6-32 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.13 FMRRS and FMSRRTransfer contents b

Page 192

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-336.7.14 FMRX, FMXR, and FMSTATTransfer con

Page 193

Vector Floating-point Programming 6-34 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.15 FMUL and FNMULFloating-point multi

Page 194 - MOV r0, r0

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-356.7.16 FSITO and FUITOConvert signed inte

Page 195 - Thumb Instruction Reference

Vector Floating-point Programming 6-36 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.17 FSQRTFloating-point square root in

Page 196

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-376.7.18 FTOSI and FTOUIConvert floating-po

Page 197

Vector Floating-point Programming 6-38 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.8 VFP pseudo-instructionThere is one VF

Page 198

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-39Examples FLDD d1,=3.12E106 ;

Page 199

Vector Floating-point Programming 6-40 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.9 VFP directives and vector notationThi

Page 200

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-416.9.1 VFPASSERT SCALARThe VFPASSERT SCALA

Page 201

Writing ARM and Thumb Assembly Language 2-16 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BIn an ARM assembly language source

Page 202

Vector Floating-point Programming 6-42 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.9.2 VFPASSERT VECTORThe VFPASSERT VECTO

Page 203

Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-43Example FMRX r10,FPSCR BIC r

Page 204

Vector Floating-point Programming 6-44 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B

Page 205 - POP {reglist, pc}

ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-1Chapter 7 Directives ReferenceThis chapter describes the directives that are

Page 206

Directives Reference 7-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.1 Alphabetical list of directivesTable 7-1 Location o

Page 207

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-37.2 Symbol definition directivesThis section describes

Page 208

Directives Reference 7-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.2.1 GBLA, GBLL, and GBLSThe GBLA directive declares a

Page 209

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-5ExamplesExample 7-1 declares a variable objectsize, set

Page 210

Directives Reference 7-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.2.2 LCLA, LCLL, and LCLSThe LCLA directive declares a

Page 211

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-77.2.3 SETA, SETL, and SETSThe SETA directive sets the v

Page 212

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-172.3.3 Calling subroutinesTo call su

Page 213

Directives Reference 7-8 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.2.4 RLISTThe RLIST (register list) directive gives a

Page 214

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-97.2.5 CNThe CN directive defines a name for a coprocess

Page 215

Directives Reference 7-10 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.2.6 CPThe CP directive defines a name for a specifie

Page 216

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-117.2.7 DN and SNThe DN directive defines a name for a s

Page 217

Directives Reference 7-12 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.2.8 FNThe FN directive defines a name for a specifie

Page 218

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-137.3 Data definition directivesThis section describes t

Page 219

Directives Reference 7-14 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.3.1 LTORGThe LTORG directive instructs the assembler

Page 220

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-157.3.2 MAPThe MAP directive sets the origin of a storag

Page 221

Directives Reference 7-16 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.3.3 FIELDThe FIELD directive describes space within

Page 222

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-177.3.4 SPACEThe SPACE directive reserves a zeroed block

Page 223

ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. iiiContentsARM Developer Suite Assembler GuidePrefaceAbout this book ...

Page 224

Writing ARM and Thumb Assembly Language 2-18 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.3.4 An example Thumb assembly lan

Page 225 - 5.4 Thumb branch instructions

Directives Reference 7-18 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.3.5 DCBThe DCB directive allocates one or more bytes

Page 226

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-197.3.6 DCD and DCDUThe DCD directive allocates one or m

Page 227

Directives Reference 7-20 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.3.7 DCDOThe DCDO directive allocates one or more wor

Page 228 - BL extract

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-217.3.8 DCFD and DCFDUThe DCFD directive allocates memor

Page 229

Directives Reference 7-22 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.3.9 DCFS and DCFSUThe DCFS directive allocates memor

Page 230

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-237.3.10 DCIIn ARM code, the DCI directive allocates one

Page 231 - SWI 12

Directives Reference 7-24 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.3.11 DCQ and DCQUThe DCQ directive allocates one or

Page 232

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-257.3.12 DCW and DCWUThe DCW directive allocates one or

Page 233 - 5.6 Thumb pseudo-instructions

Directives Reference 7-26 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.4 Assembly control directivesThis section describes

Page 234

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-277.4.2 MACRO and MENDThe MACRO directive marks the star

Page 235

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-192.4 Using the C preprocessorYou can

Page 236

Directives Reference 7-28 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BUse | as the argument to use the default value of a pa

Page 237 - MOV r8,r8

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-29Using a macro to produce assembly-time diagnostics:

Page 238

Directives Reference 7-30 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.4.4 IF, ELSE, and ENDIFThe IF directive introduces a

Page 239 - Chapter 6

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-31ExamplesExample 7-3 assembles the first set of instruc

Page 240

Directives Reference 7-32 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.4.5 WHILE and WENDThe WHILE directive starts a seque

Page 241

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-337.5 Frame description directivesThis section describes

Page 242

Directives Reference 7-34 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.5.1 FRAME ADDRESSThe FRAME ADDRESS directive describ

Page 243 - 6.2 Floating-point registers

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-357.5.2 FRAME POPUse the FRAME POP directive to inform t

Page 244

Directives Reference 7-36 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.5.3 FRAME PUSHUse the FRAME PUSH directive to inform

Page 245

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-37Examplep PROC ; Canonical frame address is sp + 0

Page 246 - 6.4 VFP and condition codes

Writing ARM and Thumb Assembly Language 2-20 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.5 Conditional executionIn ARM sta

Page 247

Directives Reference 7-38 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.5.5 FRAME RESTOREUse the FRAME RESTORE directive to

Page 248 - 6.5 VFP system registers

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-397.5.6 FRAME SAVEThe FRAME SAVE directive describes the

Page 249

Directives Reference 7-40 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.5.7 FRAME STATE REMEMBERThe FRAME STATE REMEMBER dir

Page 250

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-417.5.8 FRAME STATE RESTOREThe FRAME STATE RESTORE direc

Page 251 - 6.6 Flush-to-zero mode

Directives Reference 7-42 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.5.9 FUNCTION or PROCThe FUNCTION directive marks the

Page 252

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-437.5.10 ENDFUNC or ENDPThe ENDFUNC directive marks the

Page 253 - 6.7 VFP instructions

Directives Reference 7-44 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.6 Reporting directivesThis section describes the fol

Page 254

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-457.6.2 INFOThe INFO directive supports diagnostic gener

Page 255

Directives Reference 7-46 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.6.3 OPTThe OPT directive sets listing options from w

Page 256

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-47By default the -list option produces a normal listing

Page 257

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-212.5.2 Execution conditionsThe relat

Page 258

Directives Reference 7-48 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.6.4 TTL and SUBTThe TTL directive inserts a title at

Page 259

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-497.7 Miscellaneous directivesThis section describes the

Page 260

Directives Reference 7-50 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.1 ALIGNThe ALIGN directive aligns the current loca

Page 261

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-51Examples AREA cacheable, CODE, ALIGN=3rout1

Page 262 - FLDS s9, fpconst

Directives Reference 7-52 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.2 AREAThe AREA directive instructs the assembler t

Page 263

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-53Identical ELF sections with the same name are overlaid

Page 264

Directives Reference 7-54 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.3 CODE16 and CODE32The CODE16 directive instructs

Page 265

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-557.7.4 ENDThe END directive informs the assembler that

Page 266 - FNMSCSLE s6, s0, s26

Directives Reference 7-56 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.5 ENTRYThe ENTRY directive declares an entry point

Page 267

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-577.7.6 EQUThe EQU directive gives a symbolic name to a

Page 268

Writing ARM and Thumb Assembly Language 2-22 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.5.3 Using conditional execution i

Page 269

Directives Reference 7-58 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.7 EXPORT or GLOBALThe EXPORT directive declares a

Page 270

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-597.7.8 EXPORTASThe EXPORTAS directive allows you to exp

Page 271

Directives Reference 7-60 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.9 EXTERNThe EXTERN directive provides the assemble

Page 272

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-617.7.10 GET or INCLUDEThe GET directive includes a file

Page 273

Directives Reference 7-62 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.11 GLOBALSee EXPORT or GLOBAL on page 7-58.7.7.12

Page 274

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-637.7.13 INCBINThe INCBIN directive includes a file with

Page 275

Directives Reference 7-64 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.15 KEEPThe KEEP directive instructs the assembler

Page 276 - 6.8 VFP pseudo-instruction

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-657.7.16 NOFPThe NOFP directive disallows floating-point

Page 277

Directives Reference 7-66 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.18 REQUIRE8 and PRESERVE8The REQUIRE8 directive sp

Page 278

Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-677.7.19 RNThe RN directive defines a register name for

Page 279

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-23Because of the number of branches,

Page 280

Directives Reference 7-68 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.20 ROUTThe ROUT directive marks the boundaries of

Page 281

ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. Glossary-1GlossaryADS See ARM Developer Suite.ANSI American National Standards

Page 282

Glossary Glossary-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BATPCS ARM and Thumb Procedure Call Standard defines how reg

Page 283 - Directives Reference

Glossary ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. Glossary-3Interrupt A change in the normal processing sequence of an

Page 284

Glossary Glossary-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BScope The accessibility of a function or variable at a part

Page 285

ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. Index-1IndexThe items in this index are listed in alphabetical order, with symb

Page 286

IndexIndex-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068Bnumeric expressions 3-20numeric literals 3-21numeric variables

Page 287 - Example 7-2

IndexARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. Index-3GBLA 3-6, 3-13, 7-4, 7-46GBLL 3-6, 3-13, 7-4, 7-46GBLS 3-6, 3

Page 288

IndexIndex-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BLDM instruction 2-39, 2-54, 3-3, 7-8Thumb 2-46LDRpseudo-instruc

Page 289

IndexARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. Index-5Status flags 2-20STM instruction 2-39, 2-54, 3-3, 7-8Thumb 2-

Page 290

Writing ARM and Thumb Assembly Language 2-24 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BConverting to ThumbBecause B is the

Page 291

IndexIndex-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B

Page 292

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-252.6 Loading constants into register

Page 293

Writing ARM and Thumb Assembly Language 2-26 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.6.1 Direct loading with MOV and M

Page 294

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-27Direct loading with MOV in Thumb st

Page 295

Contentsiv Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.2 Format of source lines ...

Page 296

Writing ARM and Thumb Assembly Language 2-28 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BPlacing literal poolsThe assembler

Page 297

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-29 LDR r2, =0xFFFFFFFF

Page 298

Writing ARM and Thumb Assembly Language 2-30 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.7 Loading addresses into register

Page 299

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-31Note The label used with ADR or ADR

Page 300

Writing ARM and Thumb Assembly Language 2-32 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BImplementing a jump table with ADRE

Page 301

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-33Example 2-7 ARM code jump table

Page 302

Writing ARM and Thumb Assembly Language 2-34 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BConverting to ThumbExample 2-8 show

Page 303

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-352.7.2 Loading addresses with LDR Rd

Page 304

Writing ARM and Thumb Assembly Language 2-36 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B

Page 305

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-37An LDR Rd, =label example: string c

Page 306

ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. vPrefaceThis preface introduces the documentation for the ARM Developer Suite (

Page 307

Writing ARM and Thumb Assembly Language 2-38 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BConverting to ThumbThere is no post

Page 308 - IF...ELSE...ENDIF

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-392.8 Load and store multiple registe

Page 309

Writing ARM and Thumb Assembly Language 2-40 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.8.1 ARM LDM and STM instructionsT

Page 310

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-41UsageSee Implementing stacks with L

Page 311

Writing ARM and Thumb Assembly Language 2-42 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.8.3 Implementing stacks with LDM

Page 312

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-43Stacking registers for nested subro

Page 313

Writing ARM and Thumb Assembly Language 2-44 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.8.4 Block copy with LDM and STMEx

Page 314

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-45Example 2-12 AREA Blo

Page 315

Writing ARM and Thumb Assembly Language 2-46 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.8.5 Thumb LDM and STM instruction

Page 316

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-47Example 2-13 AREA Tblock,

Page 317

Preface vi Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BAbout this bookThis book provides tutorial and reference information

Page 318

Writing ARM and Thumb Assembly Language 2-48 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.9 Using macrosA macro definition

Page 319

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-492.9.2 Unsigned integer division mac

Page 320

Writing ARM and Thumb Assembly Language 2-50 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BThe macro checks that no two parame

Page 321

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-512.10 Describing data structures wit

Page 322

Writing ARM and Thumb Assembly Language 2-52 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.10.1 Relative mapsTo access data

Page 323

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-532.10.2 Register-based mapsIn many c

Page 324

Writing ARM and Thumb Assembly Language 2-54 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.10.3 Program-relative mapsYou can

Page 325

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-552.10.4 Finding the end of the alloc

Page 326 - 7.6 Reporting directives

Writing ARM and Thumb Assembly Language 2-56 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.10.5 Forcing correct alignmentYou

Page 327

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-57Example 2-21StartOfData EQU

Page 328

Preface ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. viiTypographical conventionsThe following typographical conventions are

Page 329

Writing ARM and Thumb Assembly Language 2-58 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.10.6 Using register-based MAP and

Page 330

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-59Setting up a C-type structureThere

Page 331 - 7.7 Miscellaneous directives

Writing ARM and Thumb Assembly Language 2-60 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BMaking faster access possibleTo gai

Page 332

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-61Example 2-23 on page 2-60 contains

Page 333

Writing ARM and Thumb Assembly Language 2-62 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BIf you use the same technique for a

Page 334

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-632.10.7 Using two register-based str

Page 335

Writing ARM and Thumb Assembly Language 2-64 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.10.8 Avoiding problems with MAP a

Page 336

Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-65Example 2-27 on page 2-64 loads the

Page 337

Writing ARM and Thumb Assembly Language 2-66 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.11 Using frame directivesYou must

Page 338

ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-1Chapter 3 Assembler ReferenceThis chapter provides general reference materia

Page 339

Preface viii Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B• ADS Linker and Utilities Guide (ARM DUI 0151)• CodeWarrior IDE Gu

Page 340

Assembler Reference 3-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.1 Command syntaxThis section relates only to armasm. T

Page 341

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-3/ropispecifies that the content of inputfile is read-onl

Page 342

Assembler Reference 3-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B-mdinstructs the assembler to write source file dependen

Page 343

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-5-helpinstructs the assembler to display a summary of the

Page 344

Assembler Reference 3-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B-nocacheturns off source caching. By default the assembl

Page 345

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-7Note Avoiding large multiple register transfers increas

Page 346

Assembler Reference 3-8 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.2 Format of source linesThe general form of source lin

Page 347

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-93.3 Predefined register and coprocessor namesAll registe

Page 348

Assembler Reference 3-10 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.4 Built-in variablesTable 3-1 lists the built-in vari

Page 349

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-11|ads$version| must be all lower case. The other built-i

Page 350

Preface ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. ixFeedbackARM Limited welcomes feedback on both ADS and the documentati

Page 351 - Glossary

Assembler Reference 3-12 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.5 SymbolsYou can use symbols to represent variables,

Page 352

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-133.5.2 VariablesThe value of a variable can be changed a

Page 353

Assembler Reference 3-14 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.5.4 Assembly time substitution of variablesYou can us

Page 354

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-153.5.5 LabelsLabels are symbols representing the address

Page 355

Assembler Reference 3-16 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.5.6 Local labelsA local label is a number in the rang

Page 356

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-17If routname is specified in either a label or a referen

Page 357

Assembler Reference 3-18 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.6 Expressions, literals, and operatorsThis section co

Page 358

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-193.6.1 String expressionsString expressions consist of c

Page 359

Assembler Reference 3-20 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.6.3 Numeric expressionsNumeric expressions consist of

Page 360

Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-213.6.4 Numeric literalsNumeric literals can take any of

Commentaires sur ces manuels

Pas de commentaire