1@c Copyright (C) 2010-2016 Free Software Foundation, Inc.
2@c This is part of the GAS manual.
3@c For copying conditions, see the file as.texinfo.
4@c man end
5@ifset GENERIC
6@page
7@node TIC6X-Dependent
8@chapter TIC6X Dependent Features
9@end ifset
10@ifclear GENERIC
11@node Machine Dependencies
12@chapter TIC6X Dependent Features
13@end ifclear
14
15@cindex TIC6X support
16@cindex TMS320C6X support
17@menu
18* TIC6X Options::            Options
19* TIC6X Syntax::             Syntax
20* TIC6X Directives::         Directives
21@end menu
22
23@node TIC6X Options
24@section TIC6X Options
25@cindex TIC6X options
26@cindex options for TIC6X
27
28@c man begin OPTIONS
29@table @gcctabopt
30
31@cindex @code{-march=} command line option, TIC6X
32@item -march=@var{arch}
33Enable (only) instructions from architecture @var{arch}.  By default,
34all instructions are permitted.
35
36The following values of @var{arch} are accepted: @code{c62x},
37@code{c64x}, @code{c64x+}, @code{c67x}, @code{c67x+}, @code{c674x}.
38
39@cindex @code{-mdsbt} command line option, TIC6X
40@cindex @code{-mno-dsbt} command line option, TIC6X
41@item -mdsbt
42@itemx -mno-dsbt
43The @option{-mdsbt} option causes the assembler to generate the
44@code{Tag_ABI_DSBT} attribute with a value of 1, indicating that the
45code is using DSBT addressing.  The @option{-mno-dsbt} option, the
46default, causes the tag to have a value of 0, indicating that the code
47does not use DSBT addressing.  The linker will emit a warning if
48objects of different type (DSBT and non-DSBT) are linked together.
49
50@cindex @code{-mpid=} command line option, TIC6X
51@item -mpid=no
52@itemx -mpid=near
53@itemx -mpid=far
54The @option{-mpid=} option causes the assembler to generate the
55@code{Tag_ABI_PID} attribute with a value indicating the form of data
56addressing used by the code.  @option{-mpid=no}, the default,
57indicates position-dependent data addressing, @option{-mpid=near}
58indicates position-independent addressing with GOT accesses using near
59DP addressing, and @option{-mpid=far} indicates position-independent
60addressing with GOT accesses using far DP addressing.  The linker will
61emit a warning if objects built with different settings of this option
62are linked together.
63
64@cindex @code{-mpic} command line option, TIC6X
65@cindex @code{-mno-pic} command line option, TIC6X
66@item -mpic
67@itemx -mno-pic
68The @option{-mpic} option causes the assembler to generate the
69@code{Tag_ABI_PIC} attribute with a value of 1, indicating that the
70code is using position-independent code addressing,  The
71@code{-mno-pic} option, the default, causes the tag to have a value of
720, indicating position-dependent code addressing.  The linker will
73emit a warning if objects of different type (position-dependent and
74position-independent) are linked together.
75
76@cindex TIC6X big-endian output
77@cindex TIC6X little-endian output
78@cindex big-endian output, TIC6X
79@cindex little-endian output, TIC6X
80@item -mbig-endian
81@itemx -mlittle-endian
82Generate code for the specified endianness.  The default is
83little-endian.
84
85@end table
86@c man end
87
88@node TIC6X Syntax
89@section TIC6X Syntax
90
91@cindex line comment character, TIC6X
92@cindex TIC6X line comment character
93The presence of a @samp{;} on a line indicates the start of a comment
94that extends to the end of the current line.  If a @samp{#} or
95@samp{*} appears as the first character of a line, the whole line is
96treated as a comment.  Note that if a line starts with a @samp{#}
97character then it can also be a logical line number directive
98(@pxref{Comments}) or a preprocessor control command
99(@pxref{Preprocessing}).
100
101@cindex line separator, TIC6X
102@cindex statement separator, TIC6X
103@cindex TIC6X line separator
104The @samp{@@} character can be used instead of a newline to separate
105statements.
106
107Instruction, register and functional unit names are case-insensitive.
108@command{@value{AS}} requires fully-specified functional unit names,
109such as @samp{.S1}, @samp{.L1X} or @samp{.D1T2}, on all instructions
110using a functional unit.
111
112For some instructions, there may be syntactic ambiguity between
113register or functional unit names and the names of labels or other
114symbols.  To avoid this, enclose the ambiguous symbol name in
115parentheses; register and functional unit names may not be enclosed in
116parentheses.
117
118@node TIC6X Directives
119@section TIC6X Directives
120
121@cindex machine directives, TIC6X
122@cindex TIC6X machine directives
123
124Directives controlling the set of instructions accepted by the
125assembler have effect for instructions between the directive and any
126subsequent directive overriding it.
127
128@table @code
129
130@cindex @code{.arch} directive, TIC6X
131@item .arch @var{arch}
132This has the same effect as @option{-march=@var{arch}}.
133
134@cindex @code{.cantunwind} directive, TIC6X
135@item .cantunwind
136Prevents unwinding through the current function.  No personality routine
137or exception table data is required or permitted.
138
139If this is not specified then frame unwinding information will be
140constructed from CFI directives. @pxref{CFI directives}.
141
142@cindex @code{.c6xabi_attribute} directive, TIC6X
143@item .c6xabi_attribute @var{tag}, @var{value}
144Set the C6000 EABI build attribute @var{tag} to @var{value}.
145
146The @var{tag} is either an attribute number or one of
147@code{Tag_ISA}, @code{Tag_ABI_wchar_t},
148@code{Tag_ABI_stack_align_needed},
149@code{Tag_ABI_stack_align_preserved}, @code{Tag_ABI_DSBT},
150@code{Tag_ABI_PID}, @code{Tag_ABI_PIC},
151@code{TAG_ABI_array_object_alignment},
152@code{TAG_ABI_array_object_align_expected},
153@code{Tag_ABI_compatibility} and @code{Tag_ABI_conformance}.  The
154@var{value} is either a @code{number}, @code{"string"}, or
155@code{number, "string"} depending on the tag.
156
157@cindex @code{.ehtype} directive, TIC6X
158@item .ehtype @var{symbol}
159Output an exception type table reference to @var{symbol}.
160
161@cindex @code{.endp} directive, TIC6X
162@item .endp
163Marks the end of and exception table or function.  If preceeded by a
164@code{.handlerdata} directive then this also switched back to the previous
165text section.
166
167@cindex @code{.handlerdata} directive, TIC6X
168@item .handlerdata
169Marks the end of the current function, and the start of the exception table
170entry for that function.  Anything between this directive and the
171@code{.endp} directive will be added to the exception table entry.
172
173Must be preceded by a CFI block containing a @code{.cfi_lsda} directive.
174
175@cindex @code{.nocmp} directive, TIC6X
176@item .nocmp
177Disallow use of C64x+ compact instructions in the current text
178section.
179
180@cindex @code{.personalityindex} directive, TIC6X
181@item .personalityindex @var{index}
182Sets the personality routine for the current function to the ABI specified
183compact routine number @var{index}
184
185@cindex @code{.personality} directive, TIC6X
186@item .personality @var{name}
187Sets the personality routine for the current function to @var{name}.
188
189@cindex @code{.scomm} directive, TIC6X
190@item .scomm @var{symbol}, @var{size}, @var{align}
191Like @code{.comm}, creating a common symbol @var{symbol} with size @var{size}
192and alignment @var{align}, but unlike when using @code{.comm}, this symbol
193will be placed into the small BSS section by the linker.
194
195@end table
196