aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-11-02 14:36:39 +0000
committerJoseph Myers <joseph@codesourcery.com>2010-11-02 14:36:39 +0000
commit877791769e23126090bab077d41f4d6221a23045 (patch)
treed2bb3fc25263f3ff4f0567b690aa6a453b263da2 /gas
parent34734a010beee3b56b382dc93249b6cd27c9a373 (diff)
downloadgdb-877791769e23126090bab077d41f4d6221a23045.zip
gdb-877791769e23126090bab077d41f4d6221a23045.tar.gz
gdb-877791769e23126090bab077d41f4d6221a23045.tar.bz2
bfd:
* 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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog13
-rw-r--r--gas/config/tc-tic6x.c72
-rw-r--r--gas/doc/as.texinfo24
-rw-r--r--gas/doc/c-tic6x.texi34
-rw-r--r--gas/testsuite/ChangeLog35
-rw-r--r--gas/testsuite/gas/tic6x/attr-array-directive-1.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-array-directive-1.s1
-rw-r--r--gas/testsuite/gas/tic6x/attr-array-directive-2.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-array-directive-2.s1
-rw-r--r--gas/testsuite/gas/tic6x/attr-array-directive-3.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-array-directive-3.s1
-rw-r--r--gas/testsuite/gas/tic6x/attr-array-directive-4.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-array-directive-4.s1
-rw-r--r--gas/testsuite/gas/tic6x/attr-conformance-directive-1.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-conformance-directive-1.s1
-rw-r--r--gas/testsuite/gas/tic6x/attr-conformance-directive-2.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-conformance-directive-2.s1
-rw-r--r--gas/testsuite/gas/tic6x/attr-pic-directive-1.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-pic-directive-1.s1
-rw-r--r--gas/testsuite/gas/tic6x/attr-pic-directive-2.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-pic-directive-2.s1
-rw-r--r--gas/testsuite/gas/tic6x/attr-pic-opts-mno-pic.d8
-rw-r--r--gas/testsuite/gas/tic6x/attr-pic-opts-mpic.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-pid-directive-1.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-pid-directive-1.s1
-rw-r--r--gas/testsuite/gas/tic6x/attr-pid-directive-2.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-pid-directive-2.s1
-rw-r--r--gas/testsuite/gas/tic6x/attr-pid-opts-mpid-far.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-pid-opts-mpid-near.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-pid-opts-mpid-no.d8
-rw-r--r--gas/testsuite/gas/tic6x/attr-stack-directive-1.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-stack-directive-1.s2
-rw-r--r--gas/testsuite/gas/tic6x/attr-stack-directive-2.d10
-rw-r--r--gas/testsuite/gas/tic6x/attr-stack-directive-2.s2
-rw-r--r--gas/testsuite/gas/tic6x/attr-wchar-directive-1.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-wchar-directive-1.s1
-rw-r--r--gas/testsuite/gas/tic6x/attr-wchar-directive-2.d9
-rw-r--r--gas/testsuite/gas/tic6x/attr-wchar-directive-2.s1
38 files changed, 363 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d294525..17ce85a 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-02 Joseph Myers <joseph@codesourcery.com>
+
+ * 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.
+
2010-11-01 Maciej W. Rozycki <macro@linux-mips.org>
* config/tc-mips.c (macro)[M_LD_OB, M_SD_OB]: Use the offset
diff --git a/gas/config/tc-tic6x.c b/gas/config/tc-tic6x.c
index 2f51466..c5095eb 100644
--- a/gas/config/tc-tic6x.c
+++ b/gas/config/tc-tic6x.c
@@ -52,6 +52,9 @@ enum
OPTION_MLITTLE_ENDIAN,
OPTION_MDSBT,
OPTION_MNO_DSBT,
+ OPTION_MPID,
+ OPTION_MPIC,
+ OPTION_MNO_PIC,
OPTION_MGENERATE_REL
};
@@ -64,6 +67,9 @@ struct option md_longopts[] =
{ "mlittle-endian", no_argument, NULL, OPTION_MLITTLE_ENDIAN },
{ "mdsbt", no_argument, NULL, OPTION_MDSBT },
{ "mno-dsbt", no_argument, NULL, OPTION_MNO_DSBT },
+ { "mpid", required_argument, NULL, OPTION_MPID },
+ { "mpic", no_argument, NULL, OPTION_MPIC },
+ { "mno-pic", no_argument, NULL, OPTION_MNO_PIC },
{ "mgenerate-rel", no_argument, NULL, OPTION_MGENERATE_REL },
{ NULL, no_argument, NULL, 0 }
};
@@ -120,6 +126,21 @@ static bfd_boolean tic6x_generate_rela = TRUE;
/* Whether the code uses DSBT addressing. */
static bfd_boolean tic6x_dsbt;
+/* Types of position-independent data (attribute values for
+ Tag_ABI_PID). */
+typedef enum
+ {
+ tic6x_pid_no = 0,
+ tic6x_pid_near = 1,
+ tic6x_pid_far = 2
+ } tic6x_pid_type;
+
+/* The type of data addressing used in this code. */
+static tic6x_pid_type tic6x_pid;
+
+/* Whether the code uses position-independent code. */
+static bfd_boolean tic6x_pic;
+
/* Table of supported architecture variants. */
typedef struct
{
@@ -171,6 +192,36 @@ tic6x_use_arch (const char *arch)
as_bad (_("unknown architecture '%s'"), arch);
}
+/* Table of supported -mpid arguments. */
+typedef struct
+{
+ const char *arg;
+ tic6x_pid_type attr;
+} tic6x_pid_type_table;
+static const tic6x_pid_type_table tic6x_pid_types[] =
+ {
+ { "no", tic6x_pid_no },
+ { "near", tic6x_pid_near },
+ { "far", tic6x_pid_far }
+ };
+
+/* Handle -mpid=ARG. */
+
+static void
+tic6x_use_pid (const char *arg)
+{
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE (tic6x_pid_types); i++)
+ if (strcmp (arg, tic6x_pid_types[i].arg) == 0)
+ {
+ tic6x_pid = tic6x_pid_types[i].attr;
+ return;
+ }
+
+ as_bad (_("unknown -mpid= argument '%s'"), arg);
+}
+
/* Parse a target-specific option. */
int
@@ -206,6 +257,18 @@ md_parse_option (int c, char *arg)
tic6x_dsbt = 0;
break;
+ case OPTION_MPID:
+ tic6x_use_pid (arg);
+ break;
+
+ case OPTION_MPIC:
+ tic6x_pic = 1;
+ break;
+
+ case OPTION_MNO_PIC:
+ tic6x_pic = 0;
+ break;
+
case OPTION_MGENERATE_REL:
tic6x_generate_rela = FALSE;
break;
@@ -230,6 +293,13 @@ md_show_usage (FILE *stream ATTRIBUTE_UNUSED)
fprintf (stream, _(" -mlittle-endian generate little-endian code\n"));
fprintf (stream, _(" -mdsbt code uses DSBT addressing\n"));
fprintf (stream, _(" -mno-dsbt code does not use DSBT addressing\n"));
+ fprintf (stream, _(" -mpid=no code uses position-dependent data addressing\n"));
+ fprintf (stream, _(" -mpid=near code uses position-independent data addressing,\n"
+ " GOT accesses use near DP addressing\n"));
+ fprintf (stream, _(" -mpid=far code uses position-independent data addressing,\n"
+ " GOT accesses use far DP addressing\n"));
+ fprintf (stream, _(" -mpic code addressing is position-independent\n"));
+ fprintf (stream, _(" -mno-pic code addressing is position-dependent\n"));
/* -mgenerate-rel is only for testsuite use and is deliberately
undocumented. */
@@ -3915,6 +3985,8 @@ tic6x_set_attributes (void)
tic6x_set_attribute_int (Tag_ISA, tic6x_arch_attribute);
tic6x_set_attribute_int (Tag_ABI_DSBT, tic6x_dsbt);
+ tic6x_set_attribute_int (Tag_ABI_PID, tic6x_pid);
+ tic6x_set_attribute_int (Tag_ABI_PIC, tic6x_pic);
}
/* Do machine-dependent manipulations of the frag chains after all
diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
index 0c4662b..6a3fc81 100644
--- a/gas/doc/as.texinfo
+++ b/gas/doc/as.texinfo
@@ -477,6 +477,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
@emph{Target TIC6X options:}
[@b{-march=@var{arch}}] [@b{-matomic}|@b{-mno-atomic}]
[@b{-mbig-endian}|@b{-mlittle-endian}] [@b{-mdsbt}|@b{-mno-dsbt}]
+ [@b{-mpid=no}|@b{-mpid=near}|@b{-mpid=far}] [@b{-mpic}|@b{-mno-pic}]
@end ifset
@ifset Z80
@@ -1294,6 +1295,29 @@ 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.
+@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.
+
+@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.
+
@item -mbig-endian
@itemx -mlittle-endian
Generate code for the specified endianness. The default is
diff --git a/gas/doc/c-tic6x.texi b/gas/doc/c-tic6x.texi
index cd8be23..72c873b 100644
--- a/gas/doc/c-tic6x.texi
+++ b/gas/doc/c-tic6x.texi
@@ -59,6 +59,32 @@ 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
@@ -125,7 +151,13 @@ These have the same effects as @option{-matomic} and
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_DSBT} and @code{Tag_ABI_compatibility}. The
+@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.
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 72e2633..e7936f6 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,38 @@
+2010-11-02 Joseph Myers <joseph@codesourcery.com>
+
+ * 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.
+
2010-10-29 Joseph Myers <joseph@codesourcery.com>
* gas/tic6x/attr-compatibility-directive-1.d,
diff --git a/gas/testsuite/gas/tic6x/attr-array-directive-1.d b/gas/testsuite/gas/tic6x/attr-array-directive-1.d
new file mode 100644
index 0000000..dadcf77
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-array-directive-1.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X array alignment attributes, directives 1
+#as:
+#source: attr-array-directive-1.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_array_object_alignment: 4-byte
diff --git a/gas/testsuite/gas/tic6x/attr-array-directive-1.s b/gas/testsuite/gas/tic6x/attr-array-directive-1.s
new file mode 100644
index 0000000..5f9929b
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-array-directive-1.s
@@ -0,0 +1 @@
+.c6xabi_attribute Tag_ABI_array_object_alignment, 1
diff --git a/gas/testsuite/gas/tic6x/attr-array-directive-2.d b/gas/testsuite/gas/tic6x/attr-array-directive-2.d
new file mode 100644
index 0000000..7b56735
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-array-directive-2.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X array alignment attributes, directives 2
+#as:
+#source: attr-array-directive-2.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_array_object_alignment: 16-byte
diff --git a/gas/testsuite/gas/tic6x/attr-array-directive-2.s b/gas/testsuite/gas/tic6x/attr-array-directive-2.s
new file mode 100644
index 0000000..73538f6
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-array-directive-2.s
@@ -0,0 +1 @@
+.c6xabi_attribute 18, 2
diff --git a/gas/testsuite/gas/tic6x/attr-array-directive-3.d b/gas/testsuite/gas/tic6x/attr-array-directive-3.d
new file mode 100644
index 0000000..0b74f2e
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-array-directive-3.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X array alignment attributes, directives 3
+#as:
+#source: attr-array-directive-3.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_array_object_align_expected: 4-byte
diff --git a/gas/testsuite/gas/tic6x/attr-array-directive-3.s b/gas/testsuite/gas/tic6x/attr-array-directive-3.s
new file mode 100644
index 0000000..b4bf401
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-array-directive-3.s
@@ -0,0 +1 @@
+.c6xabi_attribute Tag_ABI_array_object_align_expected, 1
diff --git a/gas/testsuite/gas/tic6x/attr-array-directive-4.d b/gas/testsuite/gas/tic6x/attr-array-directive-4.d
new file mode 100644
index 0000000..13d9e41
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-array-directive-4.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X array alignment attributes, directives 4
+#as:
+#source: attr-array-directive-4.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_array_object_align_expected: 16-byte
diff --git a/gas/testsuite/gas/tic6x/attr-array-directive-4.s b/gas/testsuite/gas/tic6x/attr-array-directive-4.s
new file mode 100644
index 0000000..484e54d
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-array-directive-4.s
@@ -0,0 +1 @@
+.c6xabi_attribute 20, 2
diff --git a/gas/testsuite/gas/tic6x/attr-conformance-directive-1.d b/gas/testsuite/gas/tic6x/attr-conformance-directive-1.d
new file mode 100644
index 0000000..cd91758
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-conformance-directive-1.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X conformance attribute, directives 1
+#as:
+#source: attr-conformance-directive-1.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ABI_conformance: "1.0"
+ Tag_ISA: C674x
diff --git a/gas/testsuite/gas/tic6x/attr-conformance-directive-1.s b/gas/testsuite/gas/tic6x/attr-conformance-directive-1.s
new file mode 100644
index 0000000..2964084
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-conformance-directive-1.s
@@ -0,0 +1 @@
+.c6xabi_attribute Tag_ABI_conformance, "1.0"
diff --git a/gas/testsuite/gas/tic6x/attr-conformance-directive-2.d b/gas/testsuite/gas/tic6x/attr-conformance-directive-2.d
new file mode 100644
index 0000000..6f13002
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-conformance-directive-2.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X conformance attribute, directives 2
+#as:
+#source: attr-conformance-directive-2.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ABI_conformance: "1.0"
+ Tag_ISA: C674x
diff --git a/gas/testsuite/gas/tic6x/attr-conformance-directive-2.s b/gas/testsuite/gas/tic6x/attr-conformance-directive-2.s
new file mode 100644
index 0000000..a112b7b
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-conformance-directive-2.s
@@ -0,0 +1 @@
+.c6xabi_attribute 67, "1.0"
diff --git a/gas/testsuite/gas/tic6x/attr-pic-directive-1.d b/gas/testsuite/gas/tic6x/attr-pic-directive-1.d
new file mode 100644
index 0000000..d453ddd
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-pic-directive-1.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X PIC attribute, directives 1
+#as:
+#source: attr-pic-directive-1.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_PIC: Code addressing position-independent
diff --git a/gas/testsuite/gas/tic6x/attr-pic-directive-1.s b/gas/testsuite/gas/tic6x/attr-pic-directive-1.s
new file mode 100644
index 0000000..2bab373
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-pic-directive-1.s
@@ -0,0 +1 @@
+.c6xabi_attribute Tag_ABI_PIC, 1
diff --git a/gas/testsuite/gas/tic6x/attr-pic-directive-2.d b/gas/testsuite/gas/tic6x/attr-pic-directive-2.d
new file mode 100644
index 0000000..40c3eec
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-pic-directive-2.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X PIC attribute, directives 2
+#as:
+#source: attr-pic-directive-2.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_PIC: Code addressing position-independent
diff --git a/gas/testsuite/gas/tic6x/attr-pic-directive-2.s b/gas/testsuite/gas/tic6x/attr-pic-directive-2.s
new file mode 100644
index 0000000..7a034d6
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-pic-directive-2.s
@@ -0,0 +1 @@
+.c6xabi_attribute 16, 1
diff --git a/gas/testsuite/gas/tic6x/attr-pic-opts-mno-pic.d b/gas/testsuite/gas/tic6x/attr-pic-opts-mno-pic.d
new file mode 100644
index 0000000..8cd2add
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-pic-opts-mno-pic.d
@@ -0,0 +1,8 @@
+#readelf: -A
+#name: C6X PIC attribute, -mno-pic
+#as: -mno-pic
+#source: dummy.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
diff --git a/gas/testsuite/gas/tic6x/attr-pic-opts-mpic.d b/gas/testsuite/gas/tic6x/attr-pic-opts-mpic.d
new file mode 100644
index 0000000..f5d371b
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-pic-opts-mpic.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X PIC attribute, -mpic
+#as: -mpic
+#source: dummy.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_PIC: Code addressing position-independent
diff --git a/gas/testsuite/gas/tic6x/attr-pid-directive-1.d b/gas/testsuite/gas/tic6x/attr-pid-directive-1.d
new file mode 100644
index 0000000..f4a2387
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-pid-directive-1.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X PID attribute, directives 1
+#as:
+#source: attr-pid-directive-1.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_PID: Data addressing position-independent, GOT near DP
diff --git a/gas/testsuite/gas/tic6x/attr-pid-directive-1.s b/gas/testsuite/gas/tic6x/attr-pid-directive-1.s
new file mode 100644
index 0000000..b973177
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-pid-directive-1.s
@@ -0,0 +1 @@
+.c6xabi_attribute Tag_ABI_PID, 1
diff --git a/gas/testsuite/gas/tic6x/attr-pid-directive-2.d b/gas/testsuite/gas/tic6x/attr-pid-directive-2.d
new file mode 100644
index 0000000..46abb9e
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-pid-directive-2.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X PID attribute, directives 2
+#as:
+#source: attr-pid-directive-2.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_PID: Data addressing position-independent, GOT far from DP
diff --git a/gas/testsuite/gas/tic6x/attr-pid-directive-2.s b/gas/testsuite/gas/tic6x/attr-pid-directive-2.s
new file mode 100644
index 0000000..c392eda
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-pid-directive-2.s
@@ -0,0 +1 @@
+.c6xabi_attribute 14, 2
diff --git a/gas/testsuite/gas/tic6x/attr-pid-opts-mpid-far.d b/gas/testsuite/gas/tic6x/attr-pid-opts-mpid-far.d
new file mode 100644
index 0000000..7a42121
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-pid-opts-mpid-far.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X PID attribute, -mpid=far
+#as: -mpid=far
+#source: dummy.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_PID: Data addressing position-independent, GOT far from DP
diff --git a/gas/testsuite/gas/tic6x/attr-pid-opts-mpid-near.d b/gas/testsuite/gas/tic6x/attr-pid-opts-mpid-near.d
new file mode 100644
index 0000000..3e3aad8
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-pid-opts-mpid-near.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X PID attribute, -mpid=near
+#as: -mpid=near
+#source: dummy.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_PID: Data addressing position-independent, GOT near DP
diff --git a/gas/testsuite/gas/tic6x/attr-pid-opts-mpid-no.d b/gas/testsuite/gas/tic6x/attr-pid-opts-mpid-no.d
new file mode 100644
index 0000000..e70555a
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-pid-opts-mpid-no.d
@@ -0,0 +1,8 @@
+#readelf: -A
+#name: C6X PID attribute, -mpid=no
+#as: -mpid=no
+#source: dummy.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
diff --git a/gas/testsuite/gas/tic6x/attr-stack-directive-1.d b/gas/testsuite/gas/tic6x/attr-stack-directive-1.d
new file mode 100644
index 0000000..ea371f3
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-stack-directive-1.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X stack alignment attributes, directives 1
+#as:
+#source: attr-stack-directive-1.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_stack_align_preserved: 16-byte
diff --git a/gas/testsuite/gas/tic6x/attr-stack-directive-1.s b/gas/testsuite/gas/tic6x/attr-stack-directive-1.s
new file mode 100644
index 0000000..46295d2
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-stack-directive-1.s
@@ -0,0 +1,2 @@
+.c6xabi_attribute Tag_ABI_stack_align_needed, 0
+.c6xabi_attribute Tag_ABI_stack_align_preserved, 1
diff --git a/gas/testsuite/gas/tic6x/attr-stack-directive-2.d b/gas/testsuite/gas/tic6x/attr-stack-directive-2.d
new file mode 100644
index 0000000..8fc8714
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-stack-directive-2.d
@@ -0,0 +1,10 @@
+#readelf: -A
+#name: C6X stack alignment attributes, directives 2
+#as:
+#source: attr-stack-directive-2.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_stack_align_needed: 16-byte
+ Tag_ABI_stack_align_preserved: 16-byte
diff --git a/gas/testsuite/gas/tic6x/attr-stack-directive-2.s b/gas/testsuite/gas/tic6x/attr-stack-directive-2.s
new file mode 100644
index 0000000..3c1c694
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-stack-directive-2.s
@@ -0,0 +1,2 @@
+.c6xabi_attribute 8, 1
+.c6xabi_attribute 10, 1
diff --git a/gas/testsuite/gas/tic6x/attr-wchar-directive-1.d b/gas/testsuite/gas/tic6x/attr-wchar-directive-1.d
new file mode 100644
index 0000000..ec0fca6
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-wchar-directive-1.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X wchar_t attribute, directives 1
+#as:
+#source: attr-wchar-directive-1.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_wchar_t: 2 bytes
diff --git a/gas/testsuite/gas/tic6x/attr-wchar-directive-1.s b/gas/testsuite/gas/tic6x/attr-wchar-directive-1.s
new file mode 100644
index 0000000..69d1186
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-wchar-directive-1.s
@@ -0,0 +1 @@
+.c6xabi_attribute Tag_ABI_wchar_t, 1
diff --git a/gas/testsuite/gas/tic6x/attr-wchar-directive-2.d b/gas/testsuite/gas/tic6x/attr-wchar-directive-2.d
new file mode 100644
index 0000000..a590682
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-wchar-directive-2.d
@@ -0,0 +1,9 @@
+#readelf: -A
+#name: C6X wchar_t attribute, directives 2
+#as:
+#source: attr-wchar-directive-2.s
+
+Attribute Section: c6xabi
+File Attributes
+ Tag_ISA: C674x
+ Tag_ABI_wchar_t: 4 bytes
diff --git a/gas/testsuite/gas/tic6x/attr-wchar-directive-2.s b/gas/testsuite/gas/tic6x/attr-wchar-directive-2.s
new file mode 100644
index 0000000..8e3830c
--- /dev/null
+++ b/gas/testsuite/gas/tic6x/attr-wchar-directive-2.s
@@ -0,0 +1 @@
+.c6xabi_attribute 6, 2