diff options
author | Joseph Myers <joseph@codesourcery.com> | 2010-06-16 00:36:04 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2010-06-16 00:36:04 +0000 |
commit | 59e6276b64b1a3b248d851e5a3f5acd63e346399 (patch) | |
tree | 67703b84ce60420523bc7446757adab7be390419 /gas/testsuite | |
parent | c562eb737ab97d1efc460606632f78bbb80169cb (diff) | |
download | gdb-59e6276b64b1a3b248d851e5a3f5acd63e346399.zip gdb-59e6276b64b1a3b248d851e5a3f5acd63e346399.tar.gz gdb-59e6276b64b1a3b248d851e5a3f5acd63e346399.tar.bz2 |
bfd:
* elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Decrease to 2.
* elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type,
elf32_tic6x_merge_arch_attributes, elf32_tic6x_merge_attributes,
elf32_tic6x_merge_private_bfd_data): New.
(bfd_elf32_bfd_merge_private_bfd_data,
elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section,
elf_backend_obj_attrs_section_type, elf_backend_obj_attrs_vendor):
Define.
* elf32-tic6x.h (elf32_tic6x_merge_arch_attributes): Declare.
binutils:
* readelf.c (display_tic6x_attribute, process_tic6x_specific):
New.
(process_arch_specific): Call process_tic6x_specific for
EM_TI_C6000.
gas:
* config/tc-tic6x.c: Include elf/tic6x.h.
(tic6x_arch_attribute, tic6x_seen_insns): New.
(tic6x_arch_table, tic6x_arches): Add attribute values.
(tic6x_use_arch): Handle attribute settings.
(tic6x_attributes_set_explicitly, s_tic6x_c6xabi_attribute,
tic6x_attribute_table, tic6x_attributes,
tic6x_convert_symbolic_attribute): New.
(md_pseudo_table): Add c6xabi_attribute.
(md_assemble): Set tic6x_seen_insns and tic6x_arch_attribute.
(tic6x_set_attribute_int, tic6x_set_attributes): New.
(tic6x_end): Call tic6x_set_attributes.
* config/tc-tic6x.h (CONVERT_SYMBOLIC_ATTRIBUTE): Define.
(tic6x_convert_symbolic_attribute): Declare.
gas/testsuite:
* gas/elf/elf.exp: Set target_machine for tic6x-*-*.
* gas/elf/section2.e-tic6x, gas/tic6x/attr-arch-directive-1.d,
gas/tic6x/attr-arch-directive-1.s,
gas/tic6x/attr-arch-directive-2.d,
gas/tic6x/attr-arch-directive-2.s,
gas/tic6x/attr-arch-directive-3.d,
gas/tic6x/attr-arch-directive-3.s,
gas/tic6x/attr-arch-directive-4.d,
gas/tic6x/attr-arch-directive-4.s,
gas/tic6x/attr-arch-directive-5.d,
gas/tic6x/attr-arch-directive-5.s,
gas/tic6x/attr-arch-opts-c62x.d, gas/tic6x/attr-arch-opts-c64x+.d,
gas/tic6x/attr-arch-opts-c64x.d, gas/tic6x/attr-arch-opts-c674x.d,
gas/tic6x/attr-arch-opts-c67x+.d, gas/tic6x/attr-arch-opts-c67x.d,
gas/tic6x/attr-arch-opts-none-1.d,
gas/tic6x/attr-arch-opts-none-2.d,
gas/tic6x/attr-arch-opts-override-1.d,
gas/tic6x/attr-arch-opts-override-2.d, gas/tic6x/empty.s: New.
include/elf:
* tic6x-attrs.h: New.
* tic6x.h: Include elf/tic6x-attrs.h for attribute table.
(C6XABI_Tag_CPU_arch_none, C6XABI_Tag_CPU_arch_C62X,
C6XABI_Tag_CPU_arch_C67X, C6XABI_Tag_CPU_arch_C67XP,
C6XABI_Tag_CPU_arch_C64X, C6XABI_Tag_CPU_arch_C64XP,
C6XABI_Tag_CPU_arch_C674X): Define.
ld:
* emulparams/elf32_tic6x_le.sh (ATTRS_SECTIONS): Define.
ld/testsuite:
* ld-elf/orphan3.d: Allow section names starting '_'.
* ld-tic6x/attr-arch-c62x-c62x.d, ld-tic6x/attr-arch-c62x-c64x+.d,
ld-tic6x/attr-arch-c62x-c64x.d, ld-tic6x/attr-arch-c62x-c674x.d,
ld-tic6x/attr-arch-c62x-c67x+.d, ld-tic6x/attr-arch-c62x-c67x.d,
ld-tic6x/attr-arch-c62x.s, ld-tic6x/attr-arch-c64x+-c62x.d,
ld-tic6x/attr-arch-c64x+-c64x+.d, ld-tic6x/attr-arch-c64x+-c64x.d,
ld-tic6x/attr-arch-c64x+-c674x.d,
ld-tic6x/attr-arch-c64x+-c67x+.d, ld-tic6x/attr-arch-c64x+-c67x.d,
ld-tic6x/attr-arch-c64x+.s, ld-tic6x/attr-arch-c64x-c62x.d,
ld-tic6x/attr-arch-c64x-c64x+.d, ld-tic6x/attr-arch-c64x-c64x.d,
ld-tic6x/attr-arch-c64x-c674x.d, ld-tic6x/attr-arch-c64x-c67x+.d,
ld-tic6x/attr-arch-c64x-c67x.d, ld-tic6x/attr-arch-c64x.s,
ld-tic6x/attr-arch-c674x-c62x.d, ld-tic6x/attr-arch-c674x-c64x+.d,
ld-tic6x/attr-arch-c674x-c64x.d, ld-tic6x/attr-arch-c674x-c674x.d,
ld-tic6x/attr-arch-c674x-c67x+.d, ld-tic6x/attr-arch-c674x-c67x.d,
ld-tic6x/attr-arch-c674x.s, ld-tic6x/attr-arch-c67x+-c62x.d,
ld-tic6x/attr-arch-c67x+-c64x+.d, ld-tic6x/attr-arch-c67x+-c64x.d,
ld-tic6x/attr-arch-c67x+-c674x.d,
ld-tic6x/attr-arch-c67x+-c67x+.d, ld-tic6x/attr-arch-c67x+-c67x.d,
ld-tic6x/attr-arch-c67x+.s, ld-tic6x/attr-arch-c67x-c62x.d,
ld-tic6x/attr-arch-c67x-c64x+.d, ld-tic6x/attr-arch-c67x-c64x.d,
ld-tic6x/attr-arch-c67x-c674x.d, ld-tic6x/attr-arch-c67x-c67x+.d,
ld-tic6x/attr-arch-c67x-c67x.d, ld-tic6x/attr-arch-c67x.s: New.
Diffstat (limited to 'gas/testsuite')
24 files changed, 179 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index b4583a1..1a5b9f2 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,24 @@ +2010-06-15 Joseph Myers <joseph@codesourcery.com> + + * gas/elf/elf.exp: Set target_machine for tic6x-*-*. + * gas/elf/section2.e-tic6x, gas/tic6x/attr-arch-directive-1.d, + gas/tic6x/attr-arch-directive-1.s, + gas/tic6x/attr-arch-directive-2.d, + gas/tic6x/attr-arch-directive-2.s, + gas/tic6x/attr-arch-directive-3.d, + gas/tic6x/attr-arch-directive-3.s, + gas/tic6x/attr-arch-directive-4.d, + gas/tic6x/attr-arch-directive-4.s, + gas/tic6x/attr-arch-directive-5.d, + gas/tic6x/attr-arch-directive-5.s, + gas/tic6x/attr-arch-opts-c62x.d, gas/tic6x/attr-arch-opts-c64x+.d, + gas/tic6x/attr-arch-opts-c64x.d, gas/tic6x/attr-arch-opts-c674x.d, + gas/tic6x/attr-arch-opts-c67x+.d, gas/tic6x/attr-arch-opts-c67x.d, + gas/tic6x/attr-arch-opts-none-1.d, + gas/tic6x/attr-arch-opts-none-2.d, + gas/tic6x/attr-arch-opts-override-1.d, + gas/tic6x/attr-arch-opts-override-2.d, gas/tic6x/empty.s: New. + 2010-06-14 Sebastian Andrzej Siewior <bigeasy@linutronix.de> * gas/ppc/e500.s: Add eieio, mbar and lwsync diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index 7c191ad..9771a86 100644 --- a/gas/testsuite/gas/elf/elf.exp +++ b/gas/testsuite/gas/elf/elf.exp @@ -59,6 +59,9 @@ if { ([istarget "*-*-*elf*"] if {[istarget "score-*-*"]} then { set target_machine -score } + if {[istarget "tic6x-*-*"]} then { + set target_machine -tic6x + } if {[istarget "xtensa*-*-*"]} then { set target_machine -xtensa } diff --git a/gas/testsuite/gas/elf/section2.e-tic6x b/gas/testsuite/gas/elf/section2.e-tic6x new file mode 100644 index 0000000..84463b1 --- /dev/null +++ b/gas/testsuite/gas/elf/section2.e-tic6x @@ -0,0 +1,9 @@ + +Symbol table '.symtab' contains 6 entries: + Num: Value[ ]* Size Type Bind Vis Ndx Name + 0: 0+0 0 NOTYPE LOCAL DEFAULT UND + 1: 0+0 0 SECTION LOCAL DEFAULT 1 + 2: 0+0 0 SECTION LOCAL DEFAULT 2 + 3: 0+0 0 SECTION LOCAL DEFAULT 3 + 4: 0+0 0 SECTION LOCAL DEFAULT 4 + 5: 0+0 0 SECTION LOCAL DEFAULT 5 diff --git a/gas/testsuite/gas/tic6x/attr-arch-directive-1.d b/gas/testsuite/gas/tic6x/attr-arch-directive-1.d new file mode 100644 index 0000000..e89cb95 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-directive-1.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, directives 1 +#as: -march=c64x +#source: attr-arch-directive-1.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C62x diff --git a/gas/testsuite/gas/tic6x/attr-arch-directive-1.s b/gas/testsuite/gas/tic6x/attr-arch-directive-1.s new file mode 100644 index 0000000..5d8c605 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-directive-1.s @@ -0,0 +1,3 @@ +# .arch directives override previous attributes before instructions are seen. +.arch c67x +.arch c62x diff --git a/gas/testsuite/gas/tic6x/attr-arch-directive-2.d b/gas/testsuite/gas/tic6x/attr-arch-directive-2.d new file mode 100644 index 0000000..35e3a24 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-directive-2.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, directives 2 +#as: -march=c64x +#source: attr-arch-directive-2.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C64x\+ diff --git a/gas/testsuite/gas/tic6x/attr-arch-directive-2.s b/gas/testsuite/gas/tic6x/attr-arch-directive-2.s new file mode 100644 index 0000000..b7a759f --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-directive-2.s @@ -0,0 +1,9 @@ +# .arch directives override previous attributes before instructions +# are seen, but not after. +.text +.globl f +f: +.arch c67x +.arch c62x + nop +.arch c64x+ diff --git a/gas/testsuite/gas/tic6x/attr-arch-directive-3.d b/gas/testsuite/gas/tic6x/attr-arch-directive-3.d new file mode 100644 index 0000000..d68149e --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-directive-3.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, directives 3 +#as: -march=c62x +#source: attr-arch-directive-3.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C674x diff --git a/gas/testsuite/gas/tic6x/attr-arch-directive-3.s b/gas/testsuite/gas/tic6x/attr-arch-directive-3.s new file mode 100644 index 0000000..edfca62 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-directive-3.s @@ -0,0 +1,7 @@ +# .arch directives merge attributes after instructions are seen. +.text +.globl f +f: + nop +.arch c67x +.arch c64x+ diff --git a/gas/testsuite/gas/tic6x/attr-arch-directive-4.d b/gas/testsuite/gas/tic6x/attr-arch-directive-4.d new file mode 100644 index 0000000..bf7ff28 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-directive-4.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, directives 4 +#as: +#source: attr-arch-directive-4.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C62x diff --git a/gas/testsuite/gas/tic6x/attr-arch-directive-4.s b/gas/testsuite/gas/tic6x/attr-arch-directive-4.s new file mode 100644 index 0000000..1c15ae9 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-directive-4.s @@ -0,0 +1,3 @@ +# .c6xabi_attribute directives override other architecture information. +.c6xabi_attribute 2, 1 +.arch c674x diff --git a/gas/testsuite/gas/tic6x/attr-arch-directive-5.d b/gas/testsuite/gas/tic6x/attr-arch-directive-5.d new file mode 100644 index 0000000..3edaa63 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-directive-5.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, directives 5 +#as: +#source: attr-arch-directive-5.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C62x diff --git a/gas/testsuite/gas/tic6x/attr-arch-directive-5.s b/gas/testsuite/gas/tic6x/attr-arch-directive-5.s new file mode 100644 index 0000000..81d7094 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-directive-5.s @@ -0,0 +1,3 @@ +# .c6xabi_attribute directives override other architecture information. +.arch c674x +.c6xabi_attribute Tag_C6XABI_Tag_CPU_arch, 1 diff --git a/gas/testsuite/gas/tic6x/attr-arch-opts-c62x.d b/gas/testsuite/gas/tic6x/attr-arch-opts-c62x.d new file mode 100644 index 0000000..7f3ffd2 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-opts-c62x.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, -march=c62x +#as: -march=c62x +#source: dummy.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C62x diff --git a/gas/testsuite/gas/tic6x/attr-arch-opts-c64x+.d b/gas/testsuite/gas/tic6x/attr-arch-opts-c64x+.d new file mode 100644 index 0000000..899b461 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-opts-c64x+.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, -march=c64x+ +#as: -march=c64x+ +#source: dummy.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C64x\+ diff --git a/gas/testsuite/gas/tic6x/attr-arch-opts-c64x.d b/gas/testsuite/gas/tic6x/attr-arch-opts-c64x.d new file mode 100644 index 0000000..53d6d3e --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-opts-c64x.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, -march=c64x +#as: -march=c64x +#source: dummy.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C64x diff --git a/gas/testsuite/gas/tic6x/attr-arch-opts-c674x.d b/gas/testsuite/gas/tic6x/attr-arch-opts-c674x.d new file mode 100644 index 0000000..89678ec --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-opts-c674x.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, -march=c674x +#as: -march=c674x +#source: dummy.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C674x diff --git a/gas/testsuite/gas/tic6x/attr-arch-opts-c67x+.d b/gas/testsuite/gas/tic6x/attr-arch-opts-c67x+.d new file mode 100644 index 0000000..8c5bfe3 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-opts-c67x+.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, -march=c67x+ +#as: -march=c67x+ +#source: dummy.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C67x\+ diff --git a/gas/testsuite/gas/tic6x/attr-arch-opts-c67x.d b/gas/testsuite/gas/tic6x/attr-arch-opts-c67x.d new file mode 100644 index 0000000..04c71b2 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-opts-c67x.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, -march=c67x +#as: -march=c67x +#source: dummy.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C67x diff --git a/gas/testsuite/gas/tic6x/attr-arch-opts-none-1.d b/gas/testsuite/gas/tic6x/attr-arch-opts-none-1.d new file mode 100644 index 0000000..7ece957 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-opts-none-1.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, no options 1 +#as: +#source: dummy.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C674x diff --git a/gas/testsuite/gas/tic6x/attr-arch-opts-none-2.d b/gas/testsuite/gas/tic6x/attr-arch-opts-none-2.d new file mode 100644 index 0000000..b5f0194 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-opts-none-2.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, no options 2 +#as: +#source: empty.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C674x diff --git a/gas/testsuite/gas/tic6x/attr-arch-opts-override-1.d b/gas/testsuite/gas/tic6x/attr-arch-opts-override-1.d new file mode 100644 index 0000000..ff2a997 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-opts-override-1.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, -march=c674x -march=c62x +#as: -march=c674x -march=c62x +#source: dummy.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C62x diff --git a/gas/testsuite/gas/tic6x/attr-arch-opts-override-2.d b/gas/testsuite/gas/tic6x/attr-arch-opts-override-2.d new file mode 100644 index 0000000..2c7f835 --- /dev/null +++ b/gas/testsuite/gas/tic6x/attr-arch-opts-override-2.d @@ -0,0 +1,8 @@ +#readelf: -A +#name: C6X arch attributes, -march=c62x -march=c674x +#as: -march=c62x -march=c674x +#source: dummy.s + +Attribute Section: c6xabi +File Attributes + Tag_C6XABI_Tag_CPU_arch: C674x diff --git a/gas/testsuite/gas/tic6x/empty.s b/gas/testsuite/gas/tic6x/empty.s new file mode 100644 index 0000000..291fd40 --- /dev/null +++ b/gas/testsuite/gas/tic6x/empty.s @@ -0,0 +1 @@ +# Dummy input file with no instructions at all. |