diff options
author | Claudiu Zissulescu <claziss@synopsys.com> | 2017-05-10 14:42:22 +0200 |
---|---|---|
committer | claziss <claziss@synopsys.com> | 2017-05-10 14:42:22 +0200 |
commit | 53a346d8236aec06f1d3c767716d3340fb0aa013 (patch) | |
tree | 4de962aabfa44a9640583f64e8af3e032be12947 /ld | |
parent | 21d1fbeed4b7c4d006e399437445519e6505088f (diff) | |
download | gdb-53a346d8236aec06f1d3c767716d3340fb0aa013.zip gdb-53a346d8236aec06f1d3c767716d3340fb0aa013.tar.gz gdb-53a346d8236aec06f1d3c767716d3340fb0aa013.tar.bz2 |
[ARC] Object attributes.
gas/
2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/attr-arc600.d: New file.
* testsuite/gas/arc/attr-arc600_mul32x16.d: Likewise.
* testsuite/gas/arc/attr-arc600_norm.d: Likewise.
* testsuite/gas/arc/attr-arc601.d: Likewise.
* testsuite/gas/arc/attr-arc601_mul32x16.d: Likewise.
* testsuite/gas/arc/attr-arc601_mul64.d: Likewise.
* testsuite/gas/arc/attr-arc601_norm.d: Likewise.
* testsuite/gas/arc/attr-arc700.d: Likewise.
* testsuite/gas/arc/attr-arcem.d: Likewise.
* testsuite/gas/arc/attr-archs.d: Likewise.
* testsuite/gas/arc/attr-autodetect-1.d: Likewise.
* testsuite/gas/arc/attr-autodetect-1.s: Likewise.
* testsuite/gas/arc/attr-cpu-a601.d: Likewise.
* testsuite/gas/arc/attr-cpu-a601.s: Likewise.
* testsuite/gas/arc/attr-cpu-a700.d: Likewise.
* testsuite/gas/arc/attr-cpu-a700.s: Likewise.
* testsuite/gas/arc/attr-cpu-em.d: Likewise.
* testsuite/gas/arc/attr-cpu-em.s: Likewise.
* testsuite/gas/arc/attr-cpu-hs.d: Likewise.
* testsuite/gas/arc/attr-cpu-hs.s: Likewise.
* testsuite/gas/arc/attr-em.d: Likewise.
* testsuite/gas/arc/attr-em4.d: Likewise.
* testsuite/gas/arc/attr-em4_dmips.d: Likewise.
* testsuite/gas/arc/attr-em4_fpuda.d: Likewise.
* testsuite/gas/arc/attr-em4_fpus.d: Likewise.
* testsuite/gas/arc/attr-hs.d: Likewise.
* testsuite/gas/arc/attr-hs34.d: Likewise.
* testsuite/gas/arc/attr-hs38.d: Likewise.
* testsuite/gas/arc/attr-hs38_linux.d: Likewise.
* testsuite/gas/arc/attr-mul64.d: Likewise.
* testsuite/gas/arc/attr-name.d: Likewise.
* testsuite/gas/arc/attr-name.s: Likewise.
* testsuite/gas/arc/attr-nps400.d: Likewise.
* testsuite/gas/arc/attr-override-mcpu.d: Likewise.
* testsuite/gas/arc/attr-override-mcpu.s
* testsuite/gas/arc/attr-quarkse_em.d: Likewise.
* testsuite/gas/arc/blank.s: Likewise.
* testsuite/gas/elf/section2.e-arc: Likewise.
* testsuite/gas/arc/cpu-pseudop-1.d: Update test.
* testsuite/gas/arc/cpu-pseudop-2.d: Likewise.
* testsuite/gas/arc/nps400-0.d: Likewise.
* testsuite/gas/elf/elf.exp: Set target_machine for ARC.
* config/tc-arc.c (opcode/arc-attrs.h): Include.
(ARC_GET_FLAG, ARC_SET_FLAG, streq): Define.
(arc_attribute): Declare new function.
(md_pseudo_table): Add arc_attribute.
(cpu_types): Rename default cpu features.
(selected_cpu): Set the default OSABI flag.
(mpy_option): New variable.
(pic_option): Likewise.
(sda_option): Likewise.
(tls_option): Likewise.
(feature_type, feature_list): Remove.
(arc_initial_eflag): Likewise.
(attributes_set_explicitly): New variable.
(arc_check_feature): Check also for the conflicting features.
(arc_select_cpu): Refactor assignment of selected_cpu.eflags.
(arc_option): Remove setting of private flags and architecture.
(check_cpu_feature): Refactor feature names.
(autodetect_attributes): New function.
(assemble_tokens): Use above function.
(md_parse_option): Refactor feature names.
(arc_attribute): New function.
(arc_set_attribute_int): Likewise.
(arc_set_attribute_string): Likewise.
(arc_stralloc): Likewise.
(arc_set_public_attributes): Likewise.
(arc_md_end): Likewise.
(arc_copy_symbol_attributes): Likewise.
(rc_convert_symbolic_attribute): Likewise.
* config/tc-arc.h (md_end): Define.
(CONVERT_SYMBOLIC_ATTRIBUTE): Likewise.
(TC_COPY_SYMBOL_ATTRIBUTES): Likewise.
* doc/c-arc.texi: Document ARC object attributes.
binutils/
2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
* readelf.c (decode_ARC_machine_flags): Recognize OSABI v4.
(get_arc_section_type_name): New function.
(get_section_type_name): Use the above function.
(display_arc_attribute): New function.
(process_arc_specific): Likewise.
(process_arch_specific): Handle ARC specific information.
* testsuite/binutils-all/strip-3.d: Consider ARC.attributes
section.
include/
2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
* elf/arc.h (SHT_ARC_ATTRIBUTES): Define.
(Tag_ARC_*): Define.
(E_ARC_OSABI_V4): Define.
(E_ARC_OSABI_CURRENT): Reassign it.
(TAG_CPU_*): Define.
* opcode/arc-attrs.h: New file.
* opcode/arc.h (insn_subclass_t): Assign enum values.
(insn_subclass_t): Update enum with QUARKSE1, QUARKSE2, and LL64.
(ARC_EA, ARC_CD, ARC_LLOCK, ARC_ATOMIC, ARC_MPY, ARC_MULT)
(ARC_NPS400, ARC_DPFP, ARC_SPFP, ARC_FPU, ARC_FPUDA, ARC_SWAP)
(ARC_NORM, ARC_BSCAN, ARC_UIX, ARC_TSTAMP, ARC_VBFDW)
(ARC_BARREL, ARC_DSPA, ARC_SHIFT, ARC_INTR, ARC_DIV, ARC_XMAC)
(ARC_CRC): Delete.
bfd/
2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
* elf32-arc.c (FEATURE_LIST_NAME): Define.
(CONFLICT_LIST): Likewise.
(opcode/arc-attrs.h): Include.
(arc_elf_print_private_bfd_data): Print OSABI v4 flag.
(arc_extract_features): New file.
(arc_stralloc): Likewise.
(arc_elf_merge_attributes): Likewise.
(arc_elf_merge_private_bfd_data): Use object attributes.
(bfd_arc_get_mach_from_attributes): New function.
(arc_elf_object_p): Use object attributes.
(arc_elf_final_write_processing): Likewise.
(elf32_arc_obj_attrs_arg_type): New function.
(elf32_arc_obj_attrs_handle_unknown): Likewise.
(elf32_arc_section_from_shdr): Likewise.
(elf_backend_obj_attrs_vendor): Define.
(elf_backend_obj_attrs_section): Likewise.
(elf_backend_obj_attrs_arg_type): Likewise.
(elf_backend_obj_attrs_section_type): Likewise.
(elf_backend_obj_attrs_handle_unknown): Likewise.
(elf_backend_section_from_shdr): Likewise.
ld/
2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/ld-arc/attr-merge-0.d: New file.
* testsuite/ld-arc/attr-merge-0.s: Likewise.
* testsuite/ld-arc/attr-merge-0e.s: Likewise.
* testsuite/ld-arc/attr-merge-1.d: Likewise.
* testsuite/ld-arc/attr-merge-1.s: Likewise.
* testsuite/ld-arc/attr-merge-1e.s: Likewise.
* testsuite/ld-arc/attr-merge-2.d: Likewise.
* testsuite/ld-arc/attr-merge-2.s: Likewise.
* testsuite/ld-arc/attr-merge-3.d: Likewise.
* testsuite/ld-arc/attr-merge-3.s: Likewise.
* testsuite/ld-arc/attr-merge-3e.s: Likewise.
* testsuite/ld-arc/attr-merge-4.s: Likewise.
* testsuite/ld-arc/attr-merge-5.d: Likewise.
* testsuite/ld-arc/attr-merge-5a.s: Likewise.
* testsuite/ld-arc/attr-merge-5b.s: Likewise.
* testsuite/ld-arc/attr-merge-conflict-isa.d: Likewise.
* testsuite/ld-arc/attr-merge-err-isa.d: Likewise.
* testsuite/ld-arc/attr-merge-incompatible-cpu.d: Likewise.
* testsuite/ld-arc/got-01.d: Update test.
* testsuite/ld-arc/attr-merge-err-quarkse.d: New file.
* testsuite/ld-arc/attr-quarkse.s: Likewise.
* testsuite/ld-arc/attr-quarkse2.s: Likewise.
opcodes/
2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
* arc-dis.c (parse_option): Update quarkse_em option..
* arc-ext-tbl.h (dsp_fp_flt2i, dsp_fp_i2flt): Change subclass to
QUARKSE1.
(dsp_fp_div, dsp_fp_cmp): Change subclass to QUARKSE2.
Diffstat (limited to 'ld')
23 files changed, 130 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index cd87112..b04c3e0 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,28 @@ +2017-05-10 Claudiu Zissulescu <claziss@synopsys.com> + + * testsuite/ld-arc/attr-merge-0.d: New file. + * testsuite/ld-arc/attr-merge-0.s: Likewise. + * testsuite/ld-arc/attr-merge-0e.s: Likewise. + * testsuite/ld-arc/attr-merge-1.d: Likewise. + * testsuite/ld-arc/attr-merge-1.s: Likewise. + * testsuite/ld-arc/attr-merge-1e.s: Likewise. + * testsuite/ld-arc/attr-merge-2.d: Likewise. + * testsuite/ld-arc/attr-merge-2.s: Likewise. + * testsuite/ld-arc/attr-merge-3.d: Likewise. + * testsuite/ld-arc/attr-merge-3.s: Likewise. + * testsuite/ld-arc/attr-merge-3e.s: Likewise. + * testsuite/ld-arc/attr-merge-4.s: Likewise. + * testsuite/ld-arc/attr-merge-5.d: Likewise. + * testsuite/ld-arc/attr-merge-5a.s: Likewise. + * testsuite/ld-arc/attr-merge-5b.s: Likewise. + * testsuite/ld-arc/attr-merge-conflict-isa.d: Likewise. + * testsuite/ld-arc/attr-merge-err-isa.d: Likewise. + * testsuite/ld-arc/attr-merge-incompatible-cpu.d: Likewise. + * testsuite/ld-arc/got-01.d: Update test. + * testsuite/ld-arc/attr-merge-err-quarkse.d: New file. + * testsuite/ld-arc/attr-quarkse.s: Likewise. + * testsuite/ld-arc/attr-quarkse2.s: Likewise. + 2017-05-09 Awson <kyrab@mail.ru> PR ld/21471 diff --git a/ld/testsuite/ld-arc/attr-merge-0.d b/ld/testsuite/ld-arc/attr-merge-0.d new file mode 100644 index 0000000..2c3a909 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-0.d @@ -0,0 +1,12 @@ +# source: attr-merge-0.s +# source: attr-merge-0.s +# as: +# ld: -r +# readelf: -A + +Attribute Section: ARC +File Attributes + Tag_ARC_CPU_base: ARCEM + Tag_ARC_CPU_name: "em" + Tag_ARC_ABI_osver: v4 + Tag_ARC_ISA_config: "CD" diff --git a/ld/testsuite/ld-arc/attr-merge-0.s b/ld/testsuite/ld-arc/attr-merge-0.s new file mode 100644 index 0000000..de29811 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-0.s @@ -0,0 +1,2 @@ + .cpu em + .arc_attribute Tag_ARC_ISA_config, "CD" diff --git a/ld/testsuite/ld-arc/attr-merge-0e.s b/ld/testsuite/ld-arc/attr-merge-0e.s new file mode 100644 index 0000000..b84a24c --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-0e.s @@ -0,0 +1 @@ + .cpu ARC700 diff --git a/ld/testsuite/ld-arc/attr-merge-1.d b/ld/testsuite/ld-arc/attr-merge-1.d new file mode 100644 index 0000000..e2e804d --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-1.d @@ -0,0 +1,12 @@ +# source: attr-merge-0.s +# source: attr-merge-1.s +# as: +# ld: -r +# readelf: -A + +Attribute Section: ARC +File Attributes + Tag_ARC_CPU_base: ARCEM + Tag_ARC_CPU_name: "em" + Tag_ARC_ABI_osver: v4 + Tag_ARC_ISA_config: "CD,DPFP,SPFP" diff --git a/ld/testsuite/ld-arc/attr-merge-1.s b/ld/testsuite/ld-arc/attr-merge-1.s new file mode 100644 index 0000000..527ae10 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-1.s @@ -0,0 +1,2 @@ + .cpu em + .arc_attribute Tag_ARC_ISA_config, "DPFP,SPFP" diff --git a/ld/testsuite/ld-arc/attr-merge-1e.s b/ld/testsuite/ld-arc/attr-merge-1e.s new file mode 100644 index 0000000..b9cd0e0 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-1e.s @@ -0,0 +1,2 @@ + .cpu em + .arc_attribute Tag_ARC_ISA_config, "FPUS" diff --git a/ld/testsuite/ld-arc/attr-merge-2.d b/ld/testsuite/ld-arc/attr-merge-2.d new file mode 100644 index 0000000..4c6898e --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-2.d @@ -0,0 +1,12 @@ +# source: attr-merge-0.s +# source: attr-merge-2.s +# as: +# ld: -r +# readelf: -A + +Attribute Section: ARC +File Attributes + Tag_ARC_CPU_base: ARCEM + Tag_ARC_CPU_name: "em" + Tag_ARC_ABI_osver: v5 + Tag_ARC_ISA_config: "CD" diff --git a/ld/testsuite/ld-arc/attr-merge-2.s b/ld/testsuite/ld-arc/attr-merge-2.s new file mode 100644 index 0000000..9250f02 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-2.s @@ -0,0 +1,2 @@ + .cpu em + .arc_attribute Tag_ARC_ABI_osver, 5 diff --git a/ld/testsuite/ld-arc/attr-merge-3.d b/ld/testsuite/ld-arc/attr-merge-3.d new file mode 100644 index 0000000..00d6de0 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-3.d @@ -0,0 +1,12 @@ +# source: attr-merge-3.s +# source: attr-merge-4.s +# as: +# ld: -r +# readelf: -A + +Attribute Section: ARC +File Attributes + Tag_ARC_CPU_base: ARCHS + Tag_ARC_CPU_name: "archs" + Tag_ARC_ABI_osver: v4 + Tag_ARC_ISA_config: "CD,FPUS" diff --git a/ld/testsuite/ld-arc/attr-merge-3.s b/ld/testsuite/ld-arc/attr-merge-3.s new file mode 100644 index 0000000..9eb7eba --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-3.s @@ -0,0 +1 @@ + .cpu HS diff --git a/ld/testsuite/ld-arc/attr-merge-3e.s b/ld/testsuite/ld-arc/attr-merge-3e.s new file mode 100644 index 0000000..f0cd616 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-3e.s @@ -0,0 +1 @@ + .cpu quarkse_em diff --git a/ld/testsuite/ld-arc/attr-merge-4.s b/ld/testsuite/ld-arc/attr-merge-4.s new file mode 100644 index 0000000..b9cd0e0 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-4.s @@ -0,0 +1,2 @@ + .cpu em + .arc_attribute Tag_ARC_ISA_config, "FPUS" diff --git a/ld/testsuite/ld-arc/attr-merge-5.d b/ld/testsuite/ld-arc/attr-merge-5.d new file mode 100644 index 0000000..f08b762 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-5.d @@ -0,0 +1,13 @@ +# source: attr-merge-5a.s +# source: attr-merge-5b.s +# as: +# ld: -r +# readelf: -A + +Attribute Section: ARC +File Attributes + Tag_ARC_CPU_base: ARCEM + Tag_ARC_CPU_name: "arcem" + Tag_ARC_ABI_osver: v4 + Tag_ARC_ISA_config: "CD,FPUDA,BS" + Tag_ARC_ISA_mpy_option: 6 diff --git a/ld/testsuite/ld-arc/attr-merge-5a.s b/ld/testsuite/ld-arc/attr-merge-5a.s new file mode 100644 index 0000000..f428d06 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-5a.s @@ -0,0 +1,3 @@ + .cpu arcem + .arc_attribute Tag_ARC_ISA_config, "FPUDA,CD" + .arc_attribute Tag_ARC_ISA_mpy_option, 6 diff --git a/ld/testsuite/ld-arc/attr-merge-5b.s b/ld/testsuite/ld-arc/attr-merge-5b.s new file mode 100644 index 0000000..7806803 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-5b.s @@ -0,0 +1,2 @@ + .cpu arcem + .arc_attribute Tag_ARC_ISA_config, "FPUDA,CD,BS" diff --git a/ld/testsuite/ld-arc/attr-merge-conflict-isa.d b/ld/testsuite/ld-arc/attr-merge-conflict-isa.d new file mode 100644 index 0000000..65fefe2 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-conflict-isa.d @@ -0,0 +1,6 @@ +# source: attr-merge-1.s +# source: attr-merge-1e.s +# as: +# ld: -r +# error: .* conflicting ISA extension attributes + diff --git a/ld/testsuite/ld-arc/attr-merge-err-isa.d b/ld/testsuite/ld-arc/attr-merge-err-isa.d new file mode 100644 index 0000000..4e27d86 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-err-isa.d @@ -0,0 +1,5 @@ +# source: attr-merge-3.s +# source: attr-merge-3e.s +# as: +# ld: -r +# error: .* unable to merge ISA extension attributes diff --git a/ld/testsuite/ld-arc/attr-merge-err-quarkse.d b/ld/testsuite/ld-arc/attr-merge-err-quarkse.d new file mode 100644 index 0000000..34f0409 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-err-quarkse.d @@ -0,0 +1,5 @@ +# source: attr-quarkse.s +# source: attr-quarkse2.s +# as: +# ld: -r +# error: .* conflicting ISA extension attributes diff --git a/ld/testsuite/ld-arc/attr-merge-incompatible-cpu.d b/ld/testsuite/ld-arc/attr-merge-incompatible-cpu.d new file mode 100644 index 0000000..5c51d0f --- /dev/null +++ b/ld/testsuite/ld-arc/attr-merge-incompatible-cpu.d @@ -0,0 +1,5 @@ +# source: attr-merge-0.s +# source: attr-merge-0e.s +# as: +# ld: -r +# error: .* unable to merge CPU base attributes diff --git a/ld/testsuite/ld-arc/attr-quarkse.s b/ld/testsuite/ld-arc/attr-quarkse.s new file mode 100644 index 0000000..1d64a65 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-quarkse.s @@ -0,0 +1,2 @@ + .cpu quarkse_em + dsp_fp_cmp r3,r0,r2 diff --git a/ld/testsuite/ld-arc/attr-quarkse2.s b/ld/testsuite/ld-arc/attr-quarkse2.s new file mode 100644 index 0000000..5f9f918 --- /dev/null +++ b/ld/testsuite/ld-arc/attr-quarkse2.s @@ -0,0 +1,2 @@ + .cpu arcem + fscmp r0, 0x3f800000 diff --git a/ld/testsuite/ld-arc/got-01.d b/ld/testsuite/ld-arc/got-01.d index c34d6a7..57b2903 100644 --- a/ld/testsuite/ld-arc/got-01.d +++ b/ld/testsuite/ld-arc/got-01.d @@ -3,5 +3,5 @@ #ld: #readelf: -S -There are . section headers, starting at offset 0x[0-9a-f]+: +There are \d+ section headers, starting at offset 0x[0-9a-f]+: #... |