*** empty log message ***
[deliverable/binutils-gdb.git] / gas / doc / c-bfin.texi
CommitLineData
6e38d384 1@c Copyright 2005, 2006, 2009, 2010
07c1b327
CM
2@c Free Software Foundation, Inc.
3@c This is part of the GAS manual.
4@c For copying conditions, see the file as.texinfo.
8611b8fd
MF
5@c man end
6
07c1b327
CM
7@ifset GENERIC
8@page
3b4e1885 9@node Blackfin-Dependent
07c1b327
CM
10@chapter Blackfin Dependent Features
11@end ifset
8611b8fd 12
07c1b327
CM
13@ifclear GENERIC
14@node Machine Dependencies
15@chapter Blackfin Dependent Features
16@end ifclear
17
18@cindex Blackfin support
19@menu
6306cd85
BS
20* Blackfin Options:: Blackfin Options
21* Blackfin Syntax:: Blackfin Syntax
22* Blackfin Directives:: Blackfin Directives
07c1b327
CM
23@end menu
24
6306cd85
BS
25@node Blackfin Options
26@section Options
27@cindex Blackfin options (none)
28@cindex options for Blackfin (none)
29
8611b8fd
MF
30@c man begin OPTIONS
31@table @gcctabopt
6306cd85
BS
32
33@cindex @code{-mcpu=} command line option, Blackfin
34@item -mcpu=@var{processor}@r{[}-@var{sirevision}@r{]}
35This option specifies the target processor. The optional @var{sirevision}
36is not used in assembler. It's here such that GCC can easily pass down its
37@code{-mcpu=} option. The assembler will issue an
38error message if an attempt is made to assemble an instruction which
39will not execute on the target processor. The following processor names are
40recognized:
a23c851a
MF
41@code{bf504},
42@code{bf506},
3b4e1885
JZ
43@code{bf512},
44@code{bf514},
45@code{bf516},
46@code{bf518},
6306cd85
BS
47@code{bf522},
48@code{bf523},
49@code{bf524},
50@code{bf525},
51@code{bf526},
52@code{bf527},
53@code{bf531},
54@code{bf532},
55@code{bf533},
56@code{bf534},
57@code{bf535} (not implemented yet),
58@code{bf536},
59@code{bf537},
60@code{bf538},
61@code{bf539},
62@code{bf542},
63@code{bf542m},
64@code{bf544},
65@code{bf544m},
66@code{bf547},
67@code{bf547m},
68@code{bf548},
69@code{bf548m},
70@code{bf549},
71@code{bf549m},
6e38d384 72@code{bf561},
6306cd85 73and
6e38d384 74@code{bf592}.
6306cd85 75
9982501a
JZ
76@cindex @code{-mfdpic} command line option, Blackfin
77@item -mfdpic
78Assemble for the FDPIC ABI.
79
80@cindex @code{-mno-fdpic} command line option, Blackfin
81@cindex @code{-mnopic} command line option, Blackfin
1f9bb1ca
AS
82@item -mno-fdpic
83@itemx -mnopic
9982501a 84Disable -mfdpic.
6306cd85 85@end table
8611b8fd 86@c man end
6306cd85
BS
87
88@node Blackfin Syntax
07c1b327 89@section Syntax
6306cd85
BS
90@cindex Blackfin syntax
91@cindex syntax, Blackfin
07c1b327
CM
92
93@table @code
94@item Special Characters
95Assembler input is free format and may appear anywhere on the line.
96One instruction may extend across multiple lines or more than one
97instruction may appear on the same line. White space (space, tab,
98comments or newline) may appear anywhere between tokens. A token must
99not have embedded spaces. Tokens include numbers, register names,
100keywords, user identifiers, and also some multicharacter special
101symbols like "+=", "/*" or "||".
102
103@item Instruction Delimiting
104A semicolon must terminate every instruction. Sometimes a complete
105instruction will consist of more than one operation. There are two
106cases where this occurs. The first is when two general operations
107are combined. Normally a comma separates the different parts, as in
108
109@smallexample
110a0= r3.h * r2.l, a1 = r3.l * r2.h ;
111@end smallexample
112
113The second case occurs when a general instruction is combined with one
114or two memory references for joint issue. The latter portions are
115set off by a "||" token.
116
117@smallexample
118a0 = r3.h * r2.l || r1 = [p3++] || r4 = [i2++];
119@end smallexample
120
121@item Register Names
122
123The assembler treats register names and instruction keywords in a case
124insensitive manner. User identifiers are case sensitive. Thus, R3.l,
125R3.L, r3.l and r3.L are all equivalent input to the assembler.
126
127Register names are reserved and may not be used as program identifiers.
128
129Some operations (such as "Move Register") require a register pair.
130Register pairs are always data registers and are denoted using a colon,
131eg., R3:2. The larger number must be written firsts. Note that the
132hardware only supports odd-even pairs, eg., R7:6, R5:4, R3:2, and R1:0.
133
134Some instructions (such as --SP (Push Multiple)) require a group of
135adjacent registers. Adjacent registers are denoted in the syntax by
136the range enclosed in parentheses and separated by a colon, eg., (R7:3).
137Again, the larger number appears first.
138
139Portions of a particular register may be individually specified. This
140is written with a dot (".") following the register name and then a
141letter denoting the desired portion. For 32-bit registers, ".H"
142denotes the most significant ("High") portion. ".L" denotes the
143least-significant portion. The subdivisions of the 40-bit registers
144are described later.
145
146@item Accumulators
147The set of 40-bit registers A1 and A0 that normally contain data that
148is being manipulated. Each accumulator can be accessed in four ways.
149
150@table @code
151@item one 40-bit register
152The register will be referred to as A1 or A0.
153@item one 32-bit register
154The registers are designated as A1.W or A0.W.
155@item two 16-bit registers
156The registers are designated as A1.H, A1.L, A0.H or A0.L.
157@item one 8-bit register
158The registers are designated as A1.X or A0.X for the bits that
159extend beyond bit 31.
160@end table
161
162@item Data Registers
163The set of 32-bit registers (R0, R1, R2, R3, R4, R5, R6 and R7) that
164normally contain data for manipulation. These are abbreviated as
165D-register or Dreg. Data registers can be accessed as 32-bit registers
166or as two independent 16-bit registers. The least significant 16 bits
b45619c0 167of each register is called the "low" half and is designated with ".L"
07c1b327 168following the register name. The most significant 16 bits are called
b45619c0 169the "high" half and is designated with ".H" following the name.
07c1b327
CM
170
171@smallexample
172 R7.L, r2.h, r4.L, R0.H
173@end smallexample
174
175@item Pointer Registers
176The set of 32-bit registers (P0, P1, P2, P3, P4, P5, SP and FP) that
177normally contain byte addresses of data structures. These are
178abbreviated as P-register or Preg.
179
180@smallexample
181p2, p5, fp, sp
182@end smallexample
183
184@item Stack Pointer SP
185The stack pointer contains the 32-bit address of the last occupied
186byte location in the stack. The stack grows by decrementing the
187stack pointer.
188
189@item Frame Pointer FP
190The frame pointer contains the 32-bit address of the previous frame
191pointer in the stack. It is located at the top of a frame.
192
193@item Loop Top
194LT0 and LT1. These registers contain the 32-bit address of the top of
195a zero overhead loop.
196
197@item Loop Count
198LC0 and LC1. These registers contain the 32-bit counter of the zero
199overhead loop executions.
200
201@item Loop Bottom
202LB0 and LB1. These registers contain the 32-bit address of the bottom
203of a zero overhead loop.
204
205@item Index Registers
206The set of 32-bit registers (I0, I1, I2, I3) that normally contain byte
207addresses of data structures. Abbreviated I-register or Ireg.
208
209@item Modify Registers
210The set of 32-bit registers (M0, M1, M2, M3) that normally contain
211offset values that are added and subracted to one of the index
212registers. Abbreviated as Mreg.
213
214@item Length Registers
215The set of 32-bit registers (L0, L1, L2, L3) that normally contain the
216length in bytes of the circular buffer. Abbreviated as Lreg. Clear
217the Lreg to disable circular addressing for the corresponding Ireg.
218
219@item Base Registers
220The set of 32-bit registers (B0, B1, B2, B3) that normally contain the
221base address in bytes of the circular buffer. Abbreviated as Breg.
222
223@item Floating Point
224The Blackfin family has no hardware floating point but the .float
225directive generates ieee floating point numbers for use with software
226floating point libraries.
227
228@item Blackfin Opcodes
229For detailed information on the Blackfin machine instruction set, see
230the Blackfin(r) Processor Instruction Set Reference.
231
232@end table
233
6306cd85 234@node Blackfin Directives
07c1b327 235@section Directives
6306cd85
BS
236@cindex Blackfin directives
237@cindex directives, Blackfin
07c1b327
CM
238
239The following directives are provided for compatibility with the VDSP assembler.
240
241@table @code
242@item .byte2
243Initializes a four byte data object.
244@item .byte4
245Initializes a two byte data object.
246@item .db
247TBD
248@item .dd
249TBD
250@item .dw
251TBD
252@item .var
253Define and initialize a 32 bit data object.
254@end table
This page took 0.212531 seconds and 4 git commands to generate.