OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [gas/] [doc/] [c-bfin.texi] - Blame information for rev 853

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
@c Copyright 2005
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.
5
@ifset GENERIC
6
@page
7
@node BFIN-Dependent
8
@chapter Blackfin Dependent Features
9
@end ifset
10
@ifclear GENERIC
11
@node Machine Dependencies
12
@chapter Blackfin Dependent Features
13
@end ifclear
14
 
15
@cindex Blackfin support
16
@menu
17
* BFIN Syntax::                 BFIN Syntax
18
* BFIN Directives::             BFIN Directives
19
@end menu
20
 
21
@node BFIN Syntax
22
@section Syntax
23
@cindex BFIN syntax
24
@cindex syntax, BFIN
25
 
26
@table @code
27
@item Special Characters
28
Assembler input is free format and may appear anywhere on the line.
29
One instruction may extend across multiple lines or more than one
30
instruction may appear on the same line.  White space (space, tab,
31
comments or newline) may appear anywhere between tokens.  A token must
32
not have embedded spaces.  Tokens include numbers, register names,
33
keywords, user identifiers, and also some multicharacter special
34
symbols like "+=", "/*" or "||".
35
 
36
@item Instruction Delimiting
37
A semicolon must terminate every instruction.  Sometimes a complete
38
instruction will consist of more than one operation.  There are two
39
cases where this occurs.  The first is when two general operations
40
are combined.  Normally a comma separates the different parts, as in
41
 
42
@smallexample
43
a0= r3.h * r2.l, a1 = r3.l * r2.h ;
44
@end smallexample
45
 
46
The second case occurs when a general instruction is combined with one
47
or two memory references for joint issue.  The latter portions are
48
set off by a "||" token.
49
 
50
@smallexample
51
a0 = r3.h * r2.l || r1 = [p3++] || r4 = [i2++];
52
@end smallexample
53
 
54
@item Register Names
55
 
56
The assembler treats register names and instruction keywords in a case
57
insensitive manner.  User identifiers are case sensitive.  Thus, R3.l,
58
R3.L, r3.l and r3.L are all equivalent input to the assembler.
59
 
60
Register names are reserved and may not be used as program identifiers.
61
 
62
Some operations (such as "Move Register") require a register pair.
63
Register pairs are always data registers and are denoted using a colon,
64
eg., R3:2.  The larger number must be written firsts.  Note that the
65
hardware only supports odd-even pairs, eg., R7:6, R5:4, R3:2, and R1:0.
66
 
67
Some instructions (such as --SP (Push Multiple)) require a group of
68
adjacent registers.  Adjacent registers are denoted in the syntax by
69
the range enclosed in parentheses and separated by a colon, eg., (R7:3).
70
Again, the larger number appears first.
71
 
72
Portions of a particular register may be individually specified.  This
73
is written with a dot (".") following the register name and then a
74
letter denoting the desired portion.  For 32-bit registers, ".H"
75
denotes the most significant ("High") portion.  ".L" denotes the
76
least-significant portion.  The subdivisions of the 40-bit registers
77
are described later.
78
 
79
@item Accumulators
80
The set of 40-bit registers A1 and A0 that normally contain data that
81
is being manipulated.  Each accumulator can be accessed in four ways.
82
 
83
@table @code
84
@item one 40-bit register
85
The register will be referred to as A1 or A0.
86
@item one 32-bit register
87
The registers are designated as A1.W or A0.W.
88
@item two 16-bit registers
89
The registers are designated as A1.H, A1.L, A0.H or A0.L.
90
@item one 8-bit register
91
The registers are designated as A1.X or A0.X for the bits that
92
extend beyond bit 31.
93
@end table
94
 
95
@item Data Registers
96
The set of 32-bit registers (R0, R1, R2, R3, R4, R5, R6 and R7) that
97
normally contain data for manipulation.  These are abbreviated as
98
D-register or Dreg.  Data registers can be accessed as 32-bit registers
99
or as two independent 16-bit registers.  The least significant 16 bits
100
of each register is called the "low" half and is designated with ".L"
101
following the register name.  The most significant 16 bits are called
102
the "high" half and is designated with ".H" following the name.
103
 
104
@smallexample
105
   R7.L, r2.h, r4.L, R0.H
106
@end smallexample
107
 
108
@item Pointer Registers
109
The set of 32-bit registers (P0, P1, P2, P3, P4, P5, SP and FP) that
110
normally contain byte addresses of data structures.  These are
111
abbreviated as P-register or Preg.
112
 
113
@smallexample
114
p2, p5, fp, sp
115
@end smallexample
116
 
117
@item Stack Pointer SP
118
The stack pointer contains the 32-bit address of the last occupied
119
byte location in the stack.  The stack grows by decrementing the
120
stack pointer.
121
 
122
@item Frame Pointer FP
123
The frame pointer contains the 32-bit address of the previous frame
124
pointer in the stack.  It is located at the top of a frame.
125
 
126
@item Loop Top
127
LT0 and LT1.  These registers contain the 32-bit address of the top of
128
a zero overhead loop.
129
 
130
@item Loop Count
131
LC0 and LC1.  These registers contain the 32-bit counter of the zero
132
overhead loop executions.
133
 
134
@item Loop Bottom
135
LB0 and LB1.  These registers contain the 32-bit address of the bottom
136
of a zero overhead loop.
137
 
138
@item Index Registers
139
The set of 32-bit registers (I0, I1, I2, I3) that normally contain byte
140
addresses of data structures.  Abbreviated I-register or Ireg.
141
 
142
@item Modify Registers
143
The set of 32-bit registers (M0, M1, M2, M3) that normally contain
144
offset values that are added and subracted to one of the index
145
registers.  Abbreviated as Mreg.
146
 
147
@item Length Registers
148
The set of 32-bit registers (L0, L1, L2, L3) that normally contain the
149
length in bytes of the circular buffer.  Abbreviated as Lreg.  Clear
150
the Lreg to disable circular addressing for the corresponding Ireg.
151
 
152
@item Base Registers
153
The set of 32-bit registers (B0, B1, B2, B3) that normally contain the
154
base address in bytes of the circular buffer.  Abbreviated as Breg.
155
 
156
@item Floating Point
157
The Blackfin family has no hardware floating point but the .float
158
directive generates ieee floating point numbers for use with software
159
floating point libraries.
160
 
161
@item Blackfin Opcodes
162
For detailed information on the Blackfin machine instruction set, see
163
the Blackfin(r) Processor Instruction Set Reference.
164
 
165
@end table
166
 
167
@node BFIN Directives
168
@section Directives
169
@cindex BFIN directives
170
@cindex directives, BFIN
171
 
172
The following directives are provided for compatibility with the VDSP assembler.
173
 
174
@table @code
175
@item .byte2
176
Initializes a four byte data object.
177
@item .byte4
178
Initializes a two byte data object.
179
@item .db
180
TBD
181
@item .dd
182
TBD
183
@item .dw
184
TBD
185
@item .var
186
Define and initialize a 32 bit data object.
187
@end table

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.