Add microblazeel target support to bfd, gas and ld.
[deliverable/binutils-gdb.git] / gas / doc / c-rx.texi
CommitLineData
7c31ae13 1@c Copyright 2008, 2009, 2011
c7927a3c
NC
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 RX-Dependent
8@chapter RX Dependent Features
9@end ifset
10@ifclear GENERIC
11@node Machine Dependencies
12@chapter RX Dependent Features
13@end ifclear
14
15@cindex RX support
16@menu
17* RX-Opts:: RX Assembler Command Line Options
18* RX-Modifiers:: Symbolic Operand Modifiers
19* RX-Directives:: Assembler Directives
20* RX-Float:: Floating Point
7c31ae13 21* RX-Syntax:: Syntax
c7927a3c
NC
22@end menu
23
24@node RX-Opts
25@section RX Options
26@cindex options, RX
27@cindex RX options
28
29The Renesas RX port of @code{@value{AS}} has a few target specfic
30command line options:
31
32@table @code
33
34@cindex @samp{-m32bit-doubles}
35@item -m32bit-doubles
36This option controls the ABI and indicates to use a 32-bit float ABI.
37It has no effect on the assembled instructions, but it does influence
38the behaviour of the @samp{.double} pseudo-op.
39This is the default.
40
41@cindex @samp{-m64bit-doubles}
42@item -m64bit-doubles
43This option controls the ABI and indicates to use a 64-bit float ABI.
44It has no effect on the assembled instructions, but it does influence
45the behaviour of the @samp{.double} pseudo-op.
46
47@cindex @samp{-mbig-endian}
48@item -mbig-endian
49This option controls the ABI and indicates to use a big-endian data
50ABI. It has no effect on the assembled instructions, but it does
51influence the behaviour of the @samp{.short}, @samp{.hword}, @samp{.int},
52@samp{.word}, @samp{.long}, @samp{.quad} and @samp{.octa} pseudo-ops.
53
54@cindex @samp{-mlittle-endian}
55@item -mlittle-endian
56This option controls the ABI and indicates to use a little-endian data
57ABI. It has no effect on the assembled instructions, but it does
58influence the behaviour of the @samp{.short}, @samp{.hword}, @samp{.int},
59@samp{.word}, @samp{.long}, @samp{.quad} and @samp{.octa} pseudo-ops.
60This is the default.
61
62@cindex @samp{-muse-conventional-section-names}
63@item -muse-conventional-section-names
64This option controls the default names given to the code (.text),
65initialised data (.data) and uninitialised data sections (.bss).
66
67@cindex @samp{-muse-renesas-section-names}
68@item -muse-renesas-section-names
69This option controls the default names given to the code (.P),
70initialised data (.D_1) and uninitialised data sections (.B_1).
71This is the default.
72
73@cindex @samp{-msmall-data-limit}
74@item -msmall-data-limit
75This option tells the assembler that the small data limit feature of
76the RX port of GCC is being used. This results in the assembler
d4cb0ea0
NC
77generating an undefined reference to a symbol called @code{__gp} for
78use by the relocations that are needed to support the small data limit
c7927a3c
NC
79feature. This option is not enabled by default as it would otherwise
80pollute the symbol table.
81
d4cb0ea0
NC
82@cindex @samp{-mpid}
83@item -mpid
84This option tells the assembler that the position independent data of the
85RX port of GCC is being used. This results in the assembler
86generating an undefined reference to a symbol called @code{__pid_base},
87and also setting the RX_PID flag bit in the e_flags field of the ELF
88header of the object file.
89
90@cindex @samp{-mint-register}
91@item -mint-register=@var{num}
92This option tells the assembler how many registers have been reserved
93for use by interrupt handlers. This is needed in order to compute the
94correct values for the @code{%gpreg} and @code{%pidreg} meta registers.
95
c7927a3c
NC
96@end table
97
98@node RX-Modifiers
99@section Symbolic Operand Modifiers
100
101@cindex RX modifiers
102@cindex syntax, RX
d4cb0ea0 103@cindex %gp
c7927a3c 104
d4cb0ea0 105The assembler supports one modifier when using symbol addresses
c7927a3c
NC
106in RX instruction operands. The general syntax is the following:
107
108@smallexample
d4cb0ea0 109%gp(symbol)
c7927a3c
NC
110@end smallexample
111
d4cb0ea0
NC
112The modifier returns the offset from the @var{__gp} symbol to the
113specified symbol as a 16-bit value. The intent is that this offset
114should be used in a register+offset move instruction when generating
115references to small data. Ie, like this:
116
117@smallexample
118 mov.W %gp(_foo)[%gpreg], r1
119@end smallexample
120
121The assembler also supports two meta register names which can be used
122to refer to registers whose values may not be known to the
123programmer. These meta register names are:
124
c7927a3c 125@table @code
c7927a3c 126
d4cb0ea0
NC
127@cindex @samp{%gpreg}
128@item %gpreg
129The small data address register.
130
131@cindex @samp{%pidreg}
132@item %pidreg
133The PID base address register.
c7927a3c
NC
134
135@end table
136
d4cb0ea0
NC
137Both registers normally have the value r13, but this can change if
138some registers have been reserved for use by interrupt handlers or if
139both the small data limit and position independent data features are
140being used at the same time.
141
c7927a3c
NC
142@node RX-Directives
143@section Assembler Directives
144
145@cindex assembler directives, RX
146@cindex RX assembler directives
147
148The RX version of @code{@value{AS}} has the following specific
149assembler directives:
150
151@table @code
152
153@item .3byte
154@cindex assembler directive .3byte, RX
155@cindex RX assembler directive .3byte
156Inserts a 3-byte value into the output file at the current location.
157
0e25bcb4
DD
158@item .fetchalign
159@cindex assembler directive .fetchalign, RX
160@cindex RX assembler directive .fetchalign
161If the next opcode following this directive spans a fetch line
162boundary (8 byte boundary), the opcode is aligned to that boundary.
163If the next opcode does not span a fetch line, this directive has no
164effect. Note that one or more labels may be between this directive
165and the opcode; those labels are aligned as well. Any inserted bytes
166due to alignment will form a NOP opcode.
167
c7927a3c
NC
168@end table
169
170@node RX-Float
171@section Floating Point
172
173@cindex floating point, RX
174@cindex RX floating point
175
176The floating point formats generated by directives are these.
177
178@table @code
179@cindex @code{float} directive, RX
180
181@item .float
182@code{Single} precision (32-bit) floating point constants.
183
184@cindex @code{double} directive, RX
185@item .double
186If the @option{-m64bit-doubles} command line option has been specified
187then then @code{double} directive generates @code{double} precision
188(64-bit) floating point constants, otherwise it generates
189@code{single} precision (32-bit) floating point constants. To force
190the generation of 64-bit floating point constants used the @code{dc.d}
191directive instead.
192
193@end table
7c31ae13
NC
194
195@node RX-Syntax
196@section Syntax for the RX
197@menu
198* RX-Chars:: Special Characters
199@end menu
200
201@node RX-Chars
202@subsection Special Characters
203
204@cindex line comment character, RX
205@cindex RX line comment character
206The presence of a @samp{;} appearing anywhere on a line indicates the
207start of a comment that extends to the end of that line.
208
209If a @samp{#} appears as the first character of a line then the whole
210line is treated as a comment, but in this case the line can also be a
211logical line number directive (@pxref{Comments}) or a preprocessor
212control command (@pxref{Preprocessing}).
213
214@cindex line separator, RX
215@cindex statement separator, RX
216@cindex RX line separator
217The @samp{!} character can be used to separate statements on the same
218line.
This page took 0.151668 seconds and 4 git commands to generate.