gdb: microblaze: delete useless stubs
[deliverable/binutils-gdb.git] / gas / doc / c-rx.texi
CommitLineData
b90efa5b 1@c Copyright (C) 2008-2015 Free Software Foundation, Inc.
c7927a3c
NC
2@c This is part of the GAS manual.
3@c For copying conditions, see the file as.texinfo.
4@ifset GENERIC
5@page
6@node RX-Dependent
7@chapter RX Dependent Features
8@end ifset
9@ifclear GENERIC
10@node Machine Dependencies
11@chapter RX Dependent Features
12@end ifclear
13
14@cindex RX support
15@menu
16* RX-Opts:: RX Assembler Command Line Options
17* RX-Modifiers:: Symbolic Operand Modifiers
18* RX-Directives:: Assembler Directives
19* RX-Float:: Floating Point
7c31ae13 20* RX-Syntax:: Syntax
c7927a3c
NC
21@end menu
22
23@node RX-Opts
24@section RX Options
25@cindex options, RX
26@cindex RX options
27
28The Renesas RX port of @code{@value{AS}} has a few target specfic
29command line options:
30
31@table @code
32
33@cindex @samp{-m32bit-doubles}
34@item -m32bit-doubles
35This option controls the ABI and indicates to use a 32-bit float ABI.
36It has no effect on the assembled instructions, but it does influence
37the behaviour of the @samp{.double} pseudo-op.
38This is the default.
39
40@cindex @samp{-m64bit-doubles}
41@item -m64bit-doubles
42This option controls the ABI and indicates to use a 64-bit float ABI.
43It has no effect on the assembled instructions, but it does influence
44the behaviour of the @samp{.double} pseudo-op.
45
46@cindex @samp{-mbig-endian}
47@item -mbig-endian
48This option controls the ABI and indicates to use a big-endian data
49ABI. It has no effect on the assembled instructions, but it does
50influence the behaviour of the @samp{.short}, @samp{.hword}, @samp{.int},
51@samp{.word}, @samp{.long}, @samp{.quad} and @samp{.octa} pseudo-ops.
52
53@cindex @samp{-mlittle-endian}
54@item -mlittle-endian
55This option controls the ABI and indicates to use a little-endian data
56ABI. It has no effect on the assembled instructions, but it does
57influence the behaviour of the @samp{.short}, @samp{.hword}, @samp{.int},
58@samp{.word}, @samp{.long}, @samp{.quad} and @samp{.octa} pseudo-ops.
59This is the default.
60
61@cindex @samp{-muse-conventional-section-names}
62@item -muse-conventional-section-names
63This option controls the default names given to the code (.text),
64initialised data (.data) and uninitialised data sections (.bss).
65
66@cindex @samp{-muse-renesas-section-names}
67@item -muse-renesas-section-names
68This option controls the default names given to the code (.P),
69initialised data (.D_1) and uninitialised data sections (.B_1).
70This is the default.
71
72@cindex @samp{-msmall-data-limit}
73@item -msmall-data-limit
74This option tells the assembler that the small data limit feature of
75the RX port of GCC is being used. This results in the assembler
d4cb0ea0
NC
76generating an undefined reference to a symbol called @code{__gp} for
77use by the relocations that are needed to support the small data limit
c7927a3c
NC
78feature. This option is not enabled by default as it would otherwise
79pollute the symbol table.
80
d4cb0ea0
NC
81@cindex @samp{-mpid}
82@item -mpid
83This option tells the assembler that the position independent data of the
84RX port of GCC is being used. This results in the assembler
85generating an undefined reference to a symbol called @code{__pid_base},
86and also setting the RX_PID flag bit in the e_flags field of the ELF
87header of the object file.
88
89@cindex @samp{-mint-register}
90@item -mint-register=@var{num}
91This option tells the assembler how many registers have been reserved
92for use by interrupt handlers. This is needed in order to compute the
93correct values for the @code{%gpreg} and @code{%pidreg} meta registers.
94
708e2187
NC
95@cindex @samp{-mgcc-abi}
96@item -mgcc-abi
97This option tells the assembler that the old GCC ABI is being used by
98the assembled code. With this version of the ABI function arguments
99that are passed on the stack are aligned to a 32-bit boundary.
100
101@cindex @samp{-mrx-abi}
102@item -mrx-abi
103This option tells the assembler that the official RX ABI is being used
104by the assembled code. With this version of the ABI function
105arguments that are passed on the stack are aligned to their natural
106alignments. This option is the default.
107
f0c00282
NC
108@cindex @samp{-mcpu=}
109@item -mcpu=@var{name}
110This option tells the assembler the target CPU type. Currently the
111@code{rx200}, @code{rx600} and @code{rx610} are recognised as valid
112cpu names. Attempting to assemble an instruction not supported by the
113indicated cpu type will result in an error message being generated.
114
3525236c
NC
115@cindex @samp{-mno-allow-string-insns}
116@item -mno-allow-string-insns
117This option tells the assembler to mark the object file that it is
118building as one that does not use the string instructions
4b5708f5
HPN
119@code{SMOVF}, @code{SCMPU}, @code{SMOVB}, @code{SMOVU}, @code{SUNTIL}
120@code{SWHILE} or the @code{RMPA} instruction. In addition the mark
3525236c
NC
121tells the linker to complain if an attempt is made to link the binary
122with another one that does use any of these instructions.
123
124Note - the inverse of this option, @code{-mallow-string-insns}, is
125not needed. The assembler automatically detects the use of the
126the instructions in the source code and labels the resulting
127object file appropriately. If no string instructions are detected
128then the object file is labelled as being one that can be linked with
129either string-using or string-banned object files.
c7927a3c
NC
130@end table
131
132@node RX-Modifiers
133@section Symbolic Operand Modifiers
134
135@cindex RX modifiers
136@cindex syntax, RX
d4cb0ea0 137@cindex %gp
c7927a3c 138
d4cb0ea0 139The assembler supports one modifier when using symbol addresses
c7927a3c
NC
140in RX instruction operands. The general syntax is the following:
141
142@smallexample
d4cb0ea0 143%gp(symbol)
c7927a3c
NC
144@end smallexample
145
d4cb0ea0
NC
146The modifier returns the offset from the @var{__gp} symbol to the
147specified symbol as a 16-bit value. The intent is that this offset
148should be used in a register+offset move instruction when generating
149references to small data. Ie, like this:
150
151@smallexample
152 mov.W %gp(_foo)[%gpreg], r1
153@end smallexample
154
155The assembler also supports two meta register names which can be used
156to refer to registers whose values may not be known to the
157programmer. These meta register names are:
158
c7927a3c 159@table @code
c7927a3c 160
d4cb0ea0
NC
161@cindex @samp{%gpreg}
162@item %gpreg
163The small data address register.
164
165@cindex @samp{%pidreg}
166@item %pidreg
167The PID base address register.
c7927a3c
NC
168
169@end table
170
d4cb0ea0
NC
171Both registers normally have the value r13, but this can change if
172some registers have been reserved for use by interrupt handlers or if
173both the small data limit and position independent data features are
174being used at the same time.
175
c7927a3c
NC
176@node RX-Directives
177@section Assembler Directives
178
179@cindex assembler directives, RX
180@cindex RX assembler directives
181
182The RX version of @code{@value{AS}} has the following specific
183assembler directives:
184
185@table @code
186
187@item .3byte
188@cindex assembler directive .3byte, RX
189@cindex RX assembler directive .3byte
190Inserts a 3-byte value into the output file at the current location.
191
0e25bcb4
DD
192@item .fetchalign
193@cindex assembler directive .fetchalign, RX
194@cindex RX assembler directive .fetchalign
195If the next opcode following this directive spans a fetch line
196boundary (8 byte boundary), the opcode is aligned to that boundary.
197If the next opcode does not span a fetch line, this directive has no
198effect. Note that one or more labels may be between this directive
199and the opcode; those labels are aligned as well. Any inserted bytes
200due to alignment will form a NOP opcode.
201
c7927a3c
NC
202@end table
203
204@node RX-Float
205@section Floating Point
206
207@cindex floating point, RX
208@cindex RX floating point
209
210The floating point formats generated by directives are these.
211
212@table @code
213@cindex @code{float} directive, RX
214
215@item .float
216@code{Single} precision (32-bit) floating point constants.
217
218@cindex @code{double} directive, RX
219@item .double
220If the @option{-m64bit-doubles} command line option has been specified
221then then @code{double} directive generates @code{double} precision
222(64-bit) floating point constants, otherwise it generates
223@code{single} precision (32-bit) floating point constants. To force
224the generation of 64-bit floating point constants used the @code{dc.d}
225directive instead.
226
227@end table
7c31ae13
NC
228
229@node RX-Syntax
230@section Syntax for the RX
231@menu
232* RX-Chars:: Special Characters
233@end menu
234
235@node RX-Chars
236@subsection Special Characters
237
238@cindex line comment character, RX
239@cindex RX line comment character
240The presence of a @samp{;} appearing anywhere on a line indicates the
241start of a comment that extends to the end of that line.
242
243If a @samp{#} appears as the first character of a line then the whole
244line is treated as a comment, but in this case the line can also be a
245logical line number directive (@pxref{Comments}) or a preprocessor
246control command (@pxref{Preprocessing}).
247
248@cindex line separator, RX
249@cindex statement separator, RX
250@cindex RX line separator
251The @samp{!} character can be used to separate statements on the same
252line.
This page took 0.249185 seconds and 4 git commands to generate.