mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
877791769e
* elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Except for Tag_ABI_compatibility, treat odd tags as strings and even ones as integers. (elf32_tic6x_obj_attrs_order, elf32_tic6x_tag_to_array_alignment, elf32_tic6x_array_alignment_to_tag): New. (elf32_tic6x_merge_attributes): Handle more attributes. Set type for merged attributes. (elf_backend_obj_attrs_order): Define. binutils: * readelf.c (display_tic6x_attribute): Handle more attributes. gas: * config/tc-tic6x.c (OPTION_MPID, OPTION_MPIC, OPTION_MNO_PIC): New enum values. (md_longopts): Add options mpid, mpic and mno-pic. (tic6x_pid_type, tic6x_pid, tic6x_pic, tic6x_pid_type_table, tic6x_pid_types, tic6x_use_pid): New. (md_parse_option): Handle new options. (md_show_usage): Output help text for new options. (tic6x_set_attributes): Set PID and PIC attributes. * doc/as.texinfo: Document -mpid=, -mpic and -mno-pic. * doc/c-tic6x.texi (TIC6X Options): Likewise. gas/testsuite: * gas/tic6x/attr-array-directive-1.d, gas/tic6x/attr-array-directive-1.s, gas/tic6x/attr-array-directive-2.d, gas/tic6x/attr-array-directive-2.s, gas/tic6x/attr-array-directive-3.d, gas/tic6x/attr-array-directive-3.s, gas/tic6x/attr-array-directive-4.d, gas/tic6x/attr-array-directive-4.s, gas/tic6x/attr-conformance-directive-1.d, gas/tic6x/attr-conformance-directive-1.s, gas/tic6x/attr-conformance-directive-2.d, gas/tic6x/attr-conformance-directive-2.s, gas/tic6x/attr-pic-directive-1.d, gas/tic6x/attr-pic-directive-1.s, gas/tic6x/attr-pic-directive-2.d, gas/tic6x/attr-pic-directive-2.s, gas/tic6x/attr-pic-opts-mno-pic.d, gas/tic6x/attr-pic-opts-mpic.d, gas/tic6x/attr-pid-directive-1.d, gas/tic6x/attr-pid-directive-1.s, gas/tic6x/attr-pid-directive-2.d, gas/tic6x/attr-pid-directive-2.s, gas/tic6x/attr-pid-opts-mpid-far.d, gas/tic6x/attr-pid-opts-mpid-near.d, gas/tic6x/attr-pid-opts-mpid-no.d, gas/tic6x/attr-stack-directive-1.d, gas/tic6x/attr-stack-directive-1.s, gas/tic6x/attr-stack-directive-2.d, gas/tic6x/attr-stack-directive-2.s, gas/tic6x/attr-wchar-directive-1.d, gas/tic6x/attr-wchar-directive-1.s, gas/tic6x/attr-wchar-directive-2.d, gas/tic6x/attr-wchar-directive-2.s: New tests. include/elf: * tic6x-attrs.h (Tag_ABI_wchar_t, Tag_ABI_stack_align_needed, Tag_ABI_stack_align_preserved, Tag_ABI_PID, Tag_ABI_PIC, Tag_ABI_array_object_alignment, Tag_ABI_array_object_align_expected, Tag_ABI_conformance): Define. ld/testsuite: * ld-tic6x/attr-array-16-16.d, ld-tic6x/attr-array-16-4.d, ld-tic6x/attr-array-16-416.d, ld-tic6x/attr-array-16-48.d, ld-tic6x/attr-array-16-8.d, ld-tic6x/attr-array-16-816.d, ld-tic6x/attr-array-16.s, ld-tic6x/attr-array-4-16.d, ld-tic6x/attr-array-4-4.d, ld-tic6x/attr-array-4-416.d, ld-tic6x/attr-array-4-48.d, ld-tic6x/attr-array-4-8.d, ld-tic6x/attr-array-4-816.d, ld-tic6x/attr-array-4.s, ld-tic6x/attr-array-416-16.d, ld-tic6x/attr-array-416-4.d, ld-tic6x/attr-array-416-416.d, ld-tic6x/attr-array-416-48.d, ld-tic6x/attr-array-416-8.d, ld-tic6x/attr-array-416-816.d, ld-tic6x/attr-array-416.s, ld-tic6x/attr-array-48-16.d, ld-tic6x/attr-array-48-4.d, ld-tic6x/attr-array-48-416.d, ld-tic6x/attr-array-48-48.d, ld-tic6x/attr-array-48-8.d, ld-tic6x/attr-array-48-816.d, ld-tic6x/attr-array-48.s, ld-tic6x/attr-array-8-16.d, ld-tic6x/attr-array-8-4.d, ld-tic6x/attr-array-8-416.d, ld-tic6x/attr-array-8-48.d, ld-tic6x/attr-array-8-8.d, ld-tic6x/attr-array-8-816.d, ld-tic6x/attr-array-8.s, ld-tic6x/attr-array-816-16.d, ld-tic6x/attr-array-816-4.d, ld-tic6x/attr-array-816-416.d, ld-tic6x/attr-array-816-48.d, ld-tic6x/attr-array-816-8.d, ld-tic6x/attr-array-816-816.d, ld-tic6x/attr-array-816.s, ld-tic6x/attr-conformance-10-10.d, ld-tic6x/attr-conformance-10-11.d, ld-tic6x/attr-conformance-10-none.d, ld-tic6x/attr-conformance-10.s, ld-tic6x/attr-conformance-11-10.d, ld-tic6x/attr-conformance-11-11.d, ld-tic6x/attr-conformance-11-none.d, ld-tic6x/attr-conformance-11.s, ld-tic6x/attr-conformance-none-10.d, ld-tic6x/attr-conformance-none-11.d, ld-tic6x/attr-conformance-none-none.d, ld-tic6x/attr-conformance-none.s, ld-tic6x/attr-pic-0.s, ld-tic6x/attr-pic-00.d, ld-tic6x/attr-pic-01.d, ld-tic6x/attr-pic-1.s, ld-tic6x/attr-pic-10.d, ld-tic6x/attr-pic-11.d, ld-tic6x/attr-pid-0.s, ld-tic6x/attr-pid-00.d, ld-tic6x/attr-pid-01.d, ld-tic6x/attr-pid-02.d, ld-tic6x/attr-pid-1.s, ld-tic6x/attr-pid-10.d, ld-tic6x/attr-pid-11.d, ld-tic6x/attr-pid-12.d, ld-tic6x/attr-pid-2.s, ld-tic6x/attr-pid-20.d, ld-tic6x/attr-pid-21.d, ld-tic6x/attr-pid-22.d, ld-tic6x/attr-stack-16-16.d, ld-tic6x/attr-stack-16-8.d, ld-tic6x/attr-stack-16-816.d, ld-tic6x/attr-stack-16.s, ld-tic6x/attr-stack-8-16.d, ld-tic6x/attr-stack-8-8.d, ld-tic6x/attr-stack-8-816.d, ld-tic6x/attr-stack-8.s, ld-tic6x/attr-stack-816-16.d, ld-tic6x/attr-stack-816-8.d, ld-tic6x/attr-stack-816-816.d, ld-tic6x/attr-stack-816.s, ld-tic6x/attr-wchar-0.s, ld-tic6x/attr-wchar-00.d, ld-tic6x/attr-wchar-01.d, ld-tic6x/attr-wchar-02.d, ld-tic6x/attr-wchar-1.s, ld-tic6x/attr-wchar-10.d, ld-tic6x/attr-wchar-11.d, ld-tic6x/attr-wchar-12.d, ld-tic6x/attr-wchar-2.s, ld-tic6x/attr-wchar-20.d, ld-tic6x/attr-wchar-21.d, ld-tic6x/attr-wchar-22.d: New tests.
170 lines
5.9 KiB
Plaintext
170 lines
5.9 KiB
Plaintext
@c Copyright 2010 Free Software Foundation, Inc.
|
|
@c This is part of the GAS manual.
|
|
@c For copying conditions, see the file as.texinfo.
|
|
@ifset GENERIC
|
|
@page
|
|
@node TIC6X-Dependent
|
|
@chapter TIC6X Dependent Features
|
|
@end ifset
|
|
@ifclear GENERIC
|
|
@node Machine Dependencies
|
|
@chapter TIC6X Dependent Features
|
|
@end ifclear
|
|
|
|
@cindex TIC6X support
|
|
@cindex TMS320C6X support
|
|
@menu
|
|
* TIC6X Options:: Options
|
|
* TIC6X Syntax:: Syntax
|
|
* TIC6X Directives:: Directives
|
|
@end menu
|
|
|
|
@node TIC6X Options
|
|
@section TIC6X Options
|
|
@cindex TIC6X options
|
|
@cindex options for TIC6X
|
|
|
|
@table @code
|
|
|
|
@cindex @code{-march=} command line option, TIC6X
|
|
@item -march=@var{arch}
|
|
Enable (only) instructions from architecture @var{arch}. By default,
|
|
all instructions are permitted.
|
|
|
|
The following values of @var{arch} are accepted: @code{c62x},
|
|
@code{c64x}, @code{c64x+}, @code{c67x}, @code{c67x+}, @code{c674x}.
|
|
|
|
@cindex @code{-matomic} command line option, TIC6X
|
|
@cindex @code{-mno-atomic} command line option, TIC6X
|
|
@item -matomic
|
|
@itemx -mno-atomic
|
|
Enable or disable the optional C64x+ atomic operation instructions.
|
|
By default, they are enabled if no @option{-march} option is given, or
|
|
if an architecture is specified with @option{-march} that implies
|
|
these instructions are present (currently, there are no such
|
|
architectures); they are disabled if an architecture is specified with
|
|
@option{-march} on which the instructions are optional or not
|
|
present. This option overrides such a default from the architecture,
|
|
independent of the order in which the @option{-march} or
|
|
@option{-matomic} or @option{-mno-atomic} options are passed.
|
|
|
|
@cindex @code{-mdsbt} command line option, TIC6X
|
|
@cindex @code{-mno-dsbt} command line option, TIC6X
|
|
@item -mdsbt
|
|
@itemx -mno-dsbt
|
|
The @option{-mdsbt} option causes the assembler to generate the
|
|
@code{Tag_ABI_DSBT} attribute with a value of 1, indicating that the
|
|
code is using DSBT addressing. The @option{-mno-dsbt} option, the
|
|
default, causes the tag to have a value of 0, indicating that the code
|
|
does not use DSBT addressing. The linker will emit a warning if
|
|
objects of different type (DSBT and non-DSBT) are linked together.
|
|
|
|
@cindex @code{-mpid=} command line option, TIC6X
|
|
@item -mpid=no
|
|
@itemx -mpid=near
|
|
@itemx -mpid=far
|
|
The @option{-mpid=} option causes the assembler to generate the
|
|
@code{Tag_ABI_PID} attribute with a value indicating the form of data
|
|
addressing used by the code. @option{-mpid=no}, the default,
|
|
indicates position-dependent data addressing, @option{-mpid=near}
|
|
indicates position-independent addressing with GOT accesses using near
|
|
DP addressing, and @option{-mpid=far} indicates position-independent
|
|
addressing with GOT accesses using far DP addressing. The linker will
|
|
emit a warning if objects built with different settings of this option
|
|
are linked together.
|
|
|
|
@cindex @code{-mpic} command line option, TIC6X
|
|
@cindex @code{-mno-pic} command line option, TIC6X
|
|
@item -mpic
|
|
@itemx -mno-pic
|
|
The @option{-mpic} option causes the assembler to generate the
|
|
@code{Tag_ABI_PIC} attribute with a value of 1, indicating that the
|
|
code is using position-independent code addressing, The
|
|
@code{-mno-pic} option, the default, causes the tag to have a value of
|
|
0, indicating position-dependent code addressing. The linker will
|
|
emit a warning if objects of different type (position-dependent and
|
|
position-independent) are linked together.
|
|
|
|
@cindex TIC6X big-endian output
|
|
@cindex TIC6X little-endian output
|
|
@cindex big-endian output, TIC6X
|
|
@cindex little-endian output, TIC6X
|
|
@item -mbig-endian
|
|
@itemx -mlittle-endian
|
|
Generate code for the specified endianness. The default is
|
|
little-endian.
|
|
|
|
@end table
|
|
|
|
@node TIC6X Syntax
|
|
@section TIC6X Syntax
|
|
|
|
@cindex line comment character, TIC6X
|
|
@cindex TIC6X line comment character
|
|
The presence of a @samp{;} on a line indicates the start of a comment
|
|
that extends to the end of the current line. If a @samp{#} or
|
|
@samp{*} appears as the first character of a line, the whole line is
|
|
treated as a comment.
|
|
|
|
@cindex line separator, TIC6X
|
|
@cindex statement separator, TIC6X
|
|
@cindex TIC6X line separator
|
|
The @samp{@@} character can be used instead of a newline to separate
|
|
statements.
|
|
|
|
Instruction, register and functional unit names are case-insensitive.
|
|
@command{@value{AS}} requires fully-specified functional unit names,
|
|
such as @samp{.S1}, @samp{.L1X} or @samp{.D1T2}, on all instructions
|
|
using a functional unit.
|
|
|
|
For some instructions, there may be syntactic ambiguity between
|
|
register or functional unit names and the names of labels or other
|
|
symbols. To avoid this, enclose the ambiguous symbol name in
|
|
parentheses; register and functional unit names may not be enclosed in
|
|
parentheses.
|
|
|
|
@node TIC6X Directives
|
|
@section TIC6X Directives
|
|
|
|
@cindex machine directives, TIC6X
|
|
@cindex TIC6X machine directives
|
|
|
|
Directives controlling the set of instructions accepted by the
|
|
assembler have effect for instructions between the directive and any
|
|
subsequent directive overriding it.
|
|
|
|
@table @code
|
|
|
|
@cindex @code{.arch} directive, TIC6X
|
|
@item .arch @var{arch}
|
|
This has the same effect as @option{-march=@var{arch}}.
|
|
|
|
@cindex @code{.atomic} directive, TIC6X
|
|
@cindex @code{.noatomic} directive, TIC6X
|
|
@item .atomic
|
|
@itemx .noatomic
|
|
These have the same effects as @option{-matomic} and
|
|
@option{-mno-atomic}.
|
|
|
|
@cindex @code{.c6xabi_attribute} directive, TIC6X
|
|
@item .c6xabi_attribute @var{tag}, @var{value}
|
|
Set the C6000 EABI build attribute @var{tag} to @var{value}.
|
|
|
|
The @var{tag} is either an attribute number or one of
|
|
@code{Tag_ISA}, @code{Tag_ABI_wchar_t},
|
|
@code{Tag_ABI_stack_align_needed},
|
|
@code{Tag_ABI_stack_align_preserved}, @code{Tag_ABI_DSBT},
|
|
@code{Tag_ABI_PID}, @code{Tag_ABI_PIC},
|
|
@code{TAG_ABI_array_object_alignment},
|
|
@code{TAG_ABI_array_object_align_expected},
|
|
@code{Tag_ABI_compatibility} and @code{Tag_ABI_conformance}. The
|
|
@var{value} is either a @code{number}, @code{"string"}, or
|
|
@code{number, "string"} depending on the tag.
|
|
|
|
@cindex @code{.nocmp} directive, TIC6X
|
|
@item .nocmp
|
|
Disallow use of C64x+ compact instructions in the current text
|
|
section.
|
|
|
|
@end table
|