PR gas/12390
[binutils.git] / gas / doc / c-tic6x.texi
blobbd451c07c48fb72e7bc82b34ca7764ea3652935b
1 @c Copyright 2010, 2011 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
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
23 @node TIC6X Options
24 @section TIC6X Options
25 @cindex TIC6X options
26 @cindex options for TIC6X
28 @c man begin OPTIONS
29 @table @gcctabopt
31 @cindex @code{-march=} command line option, TIC6X
32 @item -march=@var{arch}
33 Enable (only) instructions from architecture @var{arch}.  By default,
34 all instructions are permitted.
36 The following values of @var{arch} are accepted: @code{c62x},
37 @code{c64x}, @code{c64x+}, @code{c67x}, @code{c67x+}, @code{c674x}.
39 @cindex @code{-matomic} command line option, TIC6X
40 @cindex @code{-mno-atomic} command line option, TIC6X
41 @item -matomic
42 @itemx -mno-atomic
43 Enable or disable the optional C64x+ atomic operation instructions.
44 By default, they are enabled if no @option{-march} option is given, or
45 if an architecture is specified with @option{-march} that implies
46 these instructions are present (currently, there are no such
47 architectures); they are disabled if an architecture is specified with
48 @option{-march} on which the instructions are optional or not
49 present.  This option overrides such a default from the architecture,
50 independent of the order in which the @option{-march} or
51 @option{-matomic} or @option{-mno-atomic} options are passed.
53 @cindex @code{-mdsbt} command line option, TIC6X
54 @cindex @code{-mno-dsbt} command line option, TIC6X
55 @item -mdsbt
56 @itemx -mno-dsbt
57 The @option{-mdsbt} option causes the assembler to generate the
58 @code{Tag_ABI_DSBT} attribute with a value of 1, indicating that the
59 code is using DSBT addressing.  The @option{-mno-dsbt} option, the
60 default, causes the tag to have a value of 0, indicating that the code
61 does not use DSBT addressing.  The linker will emit a warning if
62 objects of different type (DSBT and non-DSBT) are linked together.
64 @cindex @code{-mpid=} command line option, TIC6X
65 @item -mpid=no
66 @itemx -mpid=near
67 @itemx -mpid=far
68 The @option{-mpid=} option causes the assembler to generate the
69 @code{Tag_ABI_PID} attribute with a value indicating the form of data
70 addressing used by the code.  @option{-mpid=no}, the default,
71 indicates position-dependent data addressing, @option{-mpid=near}
72 indicates position-independent addressing with GOT accesses using near
73 DP addressing, and @option{-mpid=far} indicates position-independent
74 addressing with GOT accesses using far DP addressing.  The linker will
75 emit a warning if objects built with different settings of this option
76 are linked together.
78 @cindex @code{-mpic} command line option, TIC6X
79 @cindex @code{-mno-pic} command line option, TIC6X
80 @item -mpic
81 @itemx -mno-pic
82 The @option{-mpic} option causes the assembler to generate the
83 @code{Tag_ABI_PIC} attribute with a value of 1, indicating that the
84 code is using position-independent code addressing,  The
85 @code{-mno-pic} option, the default, causes the tag to have a value of
86 0, indicating position-dependent code addressing.  The linker will
87 emit a warning if objects of different type (position-dependent and
88 position-independent) are linked together.
90 @cindex TIC6X big-endian output
91 @cindex TIC6X little-endian output
92 @cindex big-endian output, TIC6X
93 @cindex little-endian output, TIC6X
94 @item -mbig-endian
95 @itemx -mlittle-endian
96 Generate code for the specified endianness.  The default is
97 little-endian.
99 @end table
100 @c man end
102 @node TIC6X Syntax
103 @section TIC6X Syntax
105 @cindex line comment character, TIC6X
106 @cindex TIC6X line comment character
107 The presence of a @samp{;} on a line indicates the start of a comment
108 that extends to the end of the current line.  If a @samp{#} or
109 @samp{*} appears as the first character of a line, the whole line is
110 treated as a comment.  Note that if a line starts with a @samp{#}
111 character then it can also be a logical line number directive
112 (@pxref{Comments}) or a preprocessor control command
113 (@pxref{Preprocessing}).
115 @cindex line separator, TIC6X
116 @cindex statement separator, TIC6X
117 @cindex TIC6X line separator
118 The @samp{@@} character can be used instead of a newline to separate
119 statements.
121 Instruction, register and functional unit names are case-insensitive.
122 @command{@value{AS}} requires fully-specified functional unit names,
123 such as @samp{.S1}, @samp{.L1X} or @samp{.D1T2}, on all instructions
124 using a functional unit.
126 For some instructions, there may be syntactic ambiguity between
127 register or functional unit names and the names of labels or other
128 symbols.  To avoid this, enclose the ambiguous symbol name in
129 parentheses; register and functional unit names may not be enclosed in
130 parentheses.
132 @node TIC6X Directives
133 @section TIC6X Directives
135 @cindex machine directives, TIC6X
136 @cindex TIC6X machine directives
138 Directives controlling the set of instructions accepted by the
139 assembler have effect for instructions between the directive and any
140 subsequent directive overriding it.
142 @table @code
144 @cindex @code{.arch} directive, TIC6X
145 @item .arch @var{arch}
146 This has the same effect as @option{-march=@var{arch}}.
148 @cindex @code{.atomic} directive, TIC6X
149 @cindex @code{.noatomic} directive, TIC6X
150 @item .atomic
151 @itemx .noatomic
152 These have the same effects as @option{-matomic} and
153 @option{-mno-atomic}.
155 @cindex @code{.c6xabi_attribute} directive, TIC6X
156 @item .c6xabi_attribute @var{tag}, @var{value}
157 Set the C6000 EABI build attribute @var{tag} to @var{value}.
159 The @var{tag} is either an attribute number or one of
160 @code{Tag_ISA}, @code{Tag_ABI_wchar_t},
161 @code{Tag_ABI_stack_align_needed},
162 @code{Tag_ABI_stack_align_preserved}, @code{Tag_ABI_DSBT},
163 @code{Tag_ABI_PID}, @code{Tag_ABI_PIC},
164 @code{TAG_ABI_array_object_alignment},
165 @code{TAG_ABI_array_object_align_expected},
166 @code{Tag_ABI_compatibility} and @code{Tag_ABI_conformance}.  The
167 @var{value} is either a @code{number}, @code{"string"}, or
168 @code{number, "string"} depending on the tag.
170 @cindex @code{.nocmp} directive, TIC6X
171 @item .nocmp
172 Disallow use of C64x+ compact instructions in the current text
173 section.
175 @end table