Merge from vendor branch GCC:
[dragonfly.git] / contrib / binutils / gas / doc / c-arc.texi
1 @c Copyright 2000, 2001 Free Software Foundation, Inc.
2 @c This is part of the GAS manual.
3 @c For copying conditions, see the file as.texinfo.
4
5 @ifset GENERIC
6 @page
7 @node ARC-Dependent
8 @chapter ARC Dependent Features
9 @end ifset
10
11 @ifclear GENERIC
12 @node Machine Dependencies
13 @chapter ARC Dependent Features
14 @end ifclear
15
16 @set ARC_CORE_DEFAULT 6
17
18 @cindex ARC support
19 @menu
20 * ARC Options::              Options
21 * ARC Syntax::               Syntax
22 * ARC Floating Point::       Floating Point
23 * ARC Directives::           ARC Machine Directives
24 * ARC Opcodes::              Opcodes
25 @end menu
26
27
28 @node ARC Options
29 @section Options
30 @cindex ARC options (none)
31 @cindex options for ARC (none)
32
33 @table @code
34
35 @cindex @code{-marc[5|6|7|8]} command line option, ARC
36 @item -marc[5|6|7|8]
37 This option selects the core processor variant. Using
38 @code{-marc} is the same as @code{-marc@value{ARC_CORE_DEFAULT}}, which
39 is also the default.
40
41 @table @code
42
43 @cindex @code{arc5} arc5, ARC
44 @item arc5
45 Base instruction set.
46
47 @cindex @code{arc6} arc6, ARC
48 @item arc6
49 Jump-and-link (jl) instruction. No requirement of an instruction between
50 setting flags and conditional jump. For example:
51
52 @smallexample
53   mov.f r0,r1
54   beq   foo
55 @end smallexample
56
57 @cindex @code{arc7} arc7, ARC
58 @item arc7
59 Break (brk) and sleep (sleep) instructions.
60
61 @cindex @code{arc8} arc8, ARC
62 @item arc8
63 Software interrupt (swi) instruction.
64
65 @end table
66
67 Note: the @code{.option} directive can to be used to select a core
68 variant from within assembly code.
69
70 @cindex @code{-EB} command line option, ARC
71 @item -EB
72 This option specifies that the output generated by the assembler should
73 be marked as being encoded for a big-endian processor.
74
75 @cindex @code{-EL} command line option, ARC
76 @item -EL
77 This option specifies that the output generated by the assembler should
78 be marked as being encoded for a little-endian processor - this is the
79 default.
80
81 @end table
82
83
84 @node ARC Syntax
85 @section Syntax
86 @menu
87 * ARC-Chars::                Special Characters
88 * ARC-Regs::                 Register Names
89 @end menu
90
91 @node ARC-Chars
92 @subsection Special Characters
93
94 @cindex ARC special characters
95 @cindex special characters, ARC
96 *TODO*
97
98 @node ARC-Regs
99 @subsection Register Names
100
101 @cindex ARC register names
102 @cindex register names, ARC
103 *TODO*
104
105
106 @node ARC Floating Point
107 @section Floating Point
108
109 @cindex floating point, ARC (@sc{ieee})
110 @cindex ARC floating point (@sc{ieee})
111 The ARC core does not currently have hardware floating point
112 support. Software floating point support is provided by @code{GCC}
113 and uses @sc{ieee} floating-point numbers.
114
115
116 @node ARC Directives
117 @section ARC Machine Directives
118
119 @cindex machine directives, ARC
120 @cindex ARC machine directives
121 The ARC version of @code{@value{AS}} supports the following additional
122 machine directives:
123
124 @table @code
125
126 @cindex @code{2byte} directive, ARC
127 @item .2byte @var{expressions}
128 *TODO*
129
130 @cindex @code{3byte} directive, ARC
131 @item .3byte @var{expressions}
132 *TODO*
133
134 @cindex @code{4byte} directive, ARC
135 @item .4byte @var{expressions}
136 *TODO*
137
138 @cindex @code{extAuxRegister} directive, ARC
139 @item .extAuxRegister @var{name},@var{address},@var{mode}
140 *TODO*
141
142 @smallexample
143   .extAuxRegister mulhi,0x12,w
144 @end smallexample
145
146 @cindex @code{extCondCode} directive, ARC
147 @item .extCondCode @var{suffix},@var{value}
148 *TODO*
149
150 @smallexample
151   .extCondCode is_busy,0x14
152 @end smallexample
153
154 @cindex @code{extCoreRegister} directive, ARC
155 @item .extCoreRegister @var{name},@var{regnum},@var{mode},@var{shortcut}
156 *TODO*
157
158 @smallexample
159   .extCoreRegister mlo,57,r,can_shortcut
160 @end smallexample
161
162 @cindex @code{extInstruction} directive, ARC
163 @item .extInstruction @var{name},@var{opcode},@var{subopcode},@var{suffixclass},@var{syntaxclass}
164 *TODO*
165
166 @smallexample
167   .extInstruction mul64,0x14,0x0,SUFFIX_COND,SYNTAX_3OP|OP1_MUST_BE_IMM
168 @end smallexample
169
170 @cindex @code{half} directive, ARC
171 @item .half @var{expressions}
172 *TODO*
173
174 @cindex @code{long} directive, ARC
175 @item .long @var{expressions}
176 *TODO*
177
178 @cindex @code{option} directive, ARC
179 @item .option @var{arc|arc5|arc6|arc7|arc8}
180 The @code{.option} directive must be followed by the desired core
181 version. Again @code{arc} is an alias for
182 @code{arc@value{ARC_CORE_DEFAULT}}.
183
184 Note: the @code{.option} directive overrides the command line option
185 @code{-marc}; a warning is emitted when the version is not consistent
186 between the two - even for the implicit default core version
187 (arc@value{ARC_CORE_DEFAULT}).
188
189 @cindex @code{short} directive, ARC
190 @item .short @var{expressions}
191 *TODO*
192
193 @cindex @code{word} directive, ARC
194 @item .word @var{expressions}
195 *TODO*
196
197 @end table
198
199
200 @node ARC Opcodes
201 @section Opcodes
202
203 @cindex ARC opcodes
204 @cindex opcodes for ARC
205
206 For information on the ARC instruction set, see @cite{ARC Programmers
207 Reference Manual}, ARC Cores Ltd.