~ubuntu-branches/ubuntu/utopic/binutils-arm64-cross/utopic

« back to all changes in this revision

Viewing changes to binutils-2.23.52.20130611/gas/doc/c-xgate.texi

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-06-20 17:38:09 UTC
  • Revision ID: package-import@ubuntu.com-20130620173809-app8lzgvymy5fg6c
Tags: 0.7
Build-depend on binutils-source (>= 2.23.52.20130620-1~).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
@c Copyright 2012
 
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 XGATE-Dependent
 
8
@chapter XGATE Dependent Features
 
9
@end ifset
 
10
@ifclear GENERIC
 
11
@node Machine Dependencies
 
12
@chapter XGATE Dependent Features
 
13
@end ifclear
 
14
 
 
15
@cindex XGATE support
 
16
@menu
 
17
* XGATE-Opts::                   XGATE Options
 
18
* XGATE-Syntax::                 Syntax
 
19
* XGATE-Directives::             Assembler Directives
 
20
* XGATE-Float::                  Floating Point
 
21
* XGATE-opcodes::                Opcodes
 
22
@end menu
 
23
 
 
24
@node XGATE-Opts
 
25
@section XGATE Options
 
26
 
 
27
@cindex options, XGATE
 
28
@cindex XGATE options
 
29
The Freescale XGATE version of @code{@value{AS}} has a few machine
 
30
dependent options.
 
31
 
 
32
@table @code
 
33
 
 
34
@cindex @samp{-mshort}
 
35
@item -mshort
 
36
This option controls the ABI and indicates to use a 16-bit integer ABI.
 
37
It has no effect on the assembled instructions.
 
38
This is the default.
 
39
 
 
40
@cindex @samp{-mlong}
 
41
@item -mlong
 
42
This option controls the ABI and indicates to use a 32-bit integer ABI.
 
43
 
 
44
@cindex @samp{-mshort-double}
 
45
@item -mshort-double
 
46
This option controls the ABI and indicates to use a 32-bit float ABI.
 
47
This is the default.
 
48
 
 
49
@cindex @samp{-mlong-double}
 
50
@item -mlong-double
 
51
This option controls the ABI and indicates to use a 64-bit float ABI.
 
52
 
 
53
@cindex @samp{--print-insn-syntax}
 
54
@item --print-insn-syntax
 
55
You can use the @samp{--print-insn-syntax} option to obtain the
 
56
syntax description of the instruction when an error is detected.
 
57
 
 
58
@cindex @samp{--print-opcodes}
 
59
@item --print-opcodes
 
60
The @samp{--print-opcodes} option prints the list of all the
 
61
instructions with their syntax. Once the list is printed
 
62
@code{@value{AS}} exits.
 
63
 
 
64
@end table
 
65
 
 
66
@node XGATE-Syntax
 
67
@section Syntax
 
68
 
 
69
@cindex XGATE syntax
 
70
@cindex syntax, XGATE
 
71
 
 
72
In XGATE RISC syntax, the instruction name comes first and it may
 
73
be followed by up to three operands. Operands are separated by commas
 
74
(@samp{,}). @code{@value{AS}} will complain if too many operands are specified
 
75
for a given instruction. The same will happen if you specified too few
 
76
 operands.
 
77
 
 
78
@smallexample
 
79
nop
 
80
ldl  #23
 
81
CMP  R1, R2
 
82
@end smallexample
 
83
 
 
84
@cindex line comment character, XGATE
 
85
@cindex XGATE line comment character
 
86
The presence of a @samp{;} character or a @samp{!} character anywhere
 
87
on a line indicates the start of a comment that extends to the end of
 
88
that line.
 
89
 
 
90
A @samp{*} or a @samp{#} character at the start of a line also
 
91
introduces a line comment, but these characters do not work elsewhere
 
92
on the line.  If the first character of the line is a @samp{#} then as
 
93
well as starting a comment, the line could also be logical line number
 
94
directive (@pxref{Comments}) or a preprocessor control command
 
95
(@pxref{Preprocessing}).
 
96
 
 
97
@cindex line separator, XGATE
 
98
@cindex statement separator, XGATE
 
99
@cindex XGATE line separator
 
100
The XGATE assembler does not currently support a line separator
 
101
character.
 
102
 
 
103
@cindex XGATE addressing modes
 
104
@cindex addressing modes, XGATE
 
105
The following addressing modes are understood for XGATE:
 
106
@table @dfn
 
107
@item Inherent
 
108
@samp{}
 
109
 
 
110
@item Immediate 3 Bit Wide
 
111
@samp{#@var{number}}
 
112
 
 
113
@item Immediate 4 Bit Wide
 
114
@samp{#@var{number}}
 
115
 
 
116
@item Immediate 8 Bit Wide
 
117
@samp{#@var{number}}
 
118
 
 
119
@item Monadic Addressing
 
120
@samp{@var{reg}}
 
121
 
 
122
@item Dyadic Addressing
 
123
@samp{@var{reg}, @var{reg}}
 
124
 
 
125
@item Triadic Addressing
 
126
@samp{@var{reg}, @var{reg}, @var{reg}}
 
127
 
 
128
@item Relative Addressing 9 Bit Wide
 
129
@samp{*@var{symbol}}
 
130
 
 
131
@item Relative Addressing 10 Bit Wide
 
132
@samp{*@var{symbol}}
 
133
 
 
134
@item Index Register plus Immediate Offset
 
135
@samp{@var{reg}, (@var{reg}, #@var{number})}
 
136
 
 
137
@item Index Register plus Register Offset
 
138
@samp{@var{reg}, @var{reg}, @var{reg}}
 
139
 
 
140
@item Index Register plus Register Offset with Post-increment
 
141
@samp{@var{reg}, @var{reg}, @var{reg}+}
 
142
 
 
143
@item Index Register plus Register Offset with Pre-decrement
 
144
@samp{@var{reg}, @var{reg}, -@var{reg}}
 
145
 
 
146
The register can be either @samp{R0}, @samp{R1}, @samp{R2}, @samp{R3},
 
147
@samp{R4}, @samp{R5}, @samp{R6} or @samp{R7}.
 
148
 
 
149
@end table
 
150
 
 
151
Convience macro opcodes to deal with 16-bit values have been added.
 
152
 
 
153
@table @dfn
 
154
 
 
155
@item Immediate 16 Bit Wide
 
156
@samp{#@var{number}}, or @samp{*@var{symbol}}
 
157
 
 
158
For example:
 
159
 
 
160
@smallexample
 
161
ldw R1, #1024
 
162
ldw R3, timer
 
163
ldw R1, (R1, #0)
 
164
COM R1
 
165
stw R2, (R1, #0)
 
166
@end smallexample
 
167
@end table
 
168
 
 
169
@node XGATE-Directives
 
170
@section Assembler Directives
 
171
 
 
172
@cindex assembler directives, XGATE
 
173
@cindex XGATE assembler directives
 
174
 
 
175
The XGATE version of @code{@value{AS}} have the following
 
176
specific assembler directives:
 
177
 
 
178
@node XGATE-Float
 
179
@section Floating Point
 
180
 
 
181
@cindex floating point, XGATE
 
182
@cindex XGATE floating point
 
183
Packed decimal (P) format floating literals are not supported(yet).
 
184
 
 
185
The floating point formats generated by directives are these.
 
186
 
 
187
@table @code
 
188
@cindex @code{float} directive, XGATE
 
189
@item .float
 
190
@code{Single} precision floating point constants.
 
191
 
 
192
@cindex @code{double} directive, XGATE
 
193
@item .double
 
194
@code{Double} precision floating point constants.
 
195
 
 
196
@cindex @code{extend} directive XGATE
 
197
@cindex @code{ldouble} directive XGATE
 
198
@item .extend
 
199
@itemx .ldouble
 
200
@code{Extended} precision (@code{long double}) floating point constants.
 
201
@end table
 
202
 
 
203
@need 2000
 
204
@node XGATE-opcodes
 
205
@section Opcodes
 
206
 
 
207
@cindex XGATE opcodes
 
208
@cindex instruction set, XGATE
 
209