From 0b2e31dc3b568d10386bcfc3e2c75e21a72be568 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Mon, 6 Mar 2006 13:42:05 +0000 Subject: bfd: * archures.c (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_b_nousp): New. Adjust other variants. (bfd_default_scan): Update. * bfd-in2.h: Rebuilt. * cpu-m68k.c: Adjust. (bfd_m68k_compatible): New. Use it for architectures. * elf32-m68k.c (elf32_m68k_object_p): Adjust. (elf32_m68k_merge_private_bfd_data): Adjust. Correct isa-a/b mismatch. (elf32_m68k_print_private_bfd_data): Adjust. * ieee.c (ieee_write_processor): Adjust. binutils: * readelf.c (get_machine_flags): Adjust. gas: * config/tc-m68k.c (m68k_extensions): Allow 'float' on both m68k and cf. (m68k_ip): Check we have some control regs. (md_parse_option): Allow raw arch switch. (m68k_init_arch): Better detection of arch/cpu mismatch. Detect whether 68881 or cfloat was meant by -mfloat. (md_show_usage): Adjust extension display. (m68k_elf_final_processing): Adjust. gas/testsuite: * gas/m68k/arch-cpu-1.s: Tweak. * gas/m68k/arch-cpu-1.d: Tweak. include/elf: * m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A, EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B, EF_M68K_ISA_C): Adjust. (EF_M68K_ISA_A_NODIV, EF_M68K_ISA_B_NOUSP): New. (EF_M68K_HW_DIV, EF_M68K_USP): Remove. (EF_M68K_MAC, EF_M68K_EMAC, EF_M68K_FLOAT): Adjust. (EF_M68K_EMAC_B): New. ld/testsuite: * ld-m68k: New tests. --- ld/testsuite/ChangeLog | 4 ++++ ld/testsuite/ld-m68k/isaa-mac.d | 7 ++++++ ld/testsuite/ld-m68k/isaa-mac.s | 3 +++ ld/testsuite/ld-m68k/isaa-nodiv.s | 3 +++ ld/testsuite/ld-m68k/isaa.d | 7 ++++++ ld/testsuite/ld-m68k/isaa.s | 3 +++ ld/testsuite/ld-m68k/isaaplus.d | 7 ++++++ ld/testsuite/ld-m68k/isaaplus.s | 3 +++ ld/testsuite/ld-m68k/isab-float.d | 7 ++++++ ld/testsuite/ld-m68k/isab-float.s | 3 +++ ld/testsuite/ld-m68k/isab-nousp.s | 3 +++ ld/testsuite/ld-m68k/isab.d | 7 ++++++ ld/testsuite/ld-m68k/isab.s | 3 +++ ld/testsuite/ld-m68k/m68k.exp | 47 +++++++++++++++++++++++++++++++++++++++ ld/testsuite/ld-m68k/merge.ld | 9 ++++++++ 15 files changed, 116 insertions(+) create mode 100644 ld/testsuite/ld-m68k/isaa-mac.d create mode 100644 ld/testsuite/ld-m68k/isaa-mac.s create mode 100644 ld/testsuite/ld-m68k/isaa-nodiv.s create mode 100644 ld/testsuite/ld-m68k/isaa.d create mode 100644 ld/testsuite/ld-m68k/isaa.s create mode 100644 ld/testsuite/ld-m68k/isaaplus.d create mode 100644 ld/testsuite/ld-m68k/isaaplus.s create mode 100644 ld/testsuite/ld-m68k/isab-float.d create mode 100644 ld/testsuite/ld-m68k/isab-float.s create mode 100644 ld/testsuite/ld-m68k/isab-nousp.s create mode 100644 ld/testsuite/ld-m68k/isab.d create mode 100644 ld/testsuite/ld-m68k/isab.s create mode 100644 ld/testsuite/ld-m68k/m68k.exp create mode 100644 ld/testsuite/ld-m68k/merge.ld (limited to 'ld') diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index a8e2d96041d..aacef8feda0 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2006-03-06 Nathan Sidwell + + * ld-m68k: New tests. + 2006-03-03 Richard Sandiford * ld-i386/vxworks1-static.d, ld-i386/vxworks2.s, diff --git a/ld/testsuite/ld-m68k/isaa-mac.d b/ld/testsuite/ld-m68k/isaa-mac.d new file mode 100644 index 00000000000..79b809a0c0c --- /dev/null +++ b/ld/testsuite/ld-m68k/isaa-mac.d @@ -0,0 +1,7 @@ + +.*: file format elf32-m68k + +Program Header: +#... +private flags = 12: \[isa A\] \[mac\] + diff --git a/ld/testsuite/ld-m68k/isaa-mac.s b/ld/testsuite/ld-m68k/isaa-mac.s new file mode 100644 index 00000000000..e3ec277c9e0 --- /dev/null +++ b/ld/testsuite/ld-m68k/isaa-mac.s @@ -0,0 +1,3 @@ + .arch isaa,mac + + nop diff --git a/ld/testsuite/ld-m68k/isaa-nodiv.s b/ld/testsuite/ld-m68k/isaa-nodiv.s new file mode 100644 index 00000000000..de327f1e451 --- /dev/null +++ b/ld/testsuite/ld-m68k/isaa-nodiv.s @@ -0,0 +1,3 @@ + .arch isaa,no-div + + nop diff --git a/ld/testsuite/ld-m68k/isaa.d b/ld/testsuite/ld-m68k/isaa.d new file mode 100644 index 00000000000..48e4fa279c8 --- /dev/null +++ b/ld/testsuite/ld-m68k/isaa.d @@ -0,0 +1,7 @@ + +.*: file format elf32-m68k + +Program Header: +#... +private flags = 2: \[isa A\] + diff --git a/ld/testsuite/ld-m68k/isaa.s b/ld/testsuite/ld-m68k/isaa.s new file mode 100644 index 00000000000..f4675c13013 --- /dev/null +++ b/ld/testsuite/ld-m68k/isaa.s @@ -0,0 +1,3 @@ + .arch isaa + + nop diff --git a/ld/testsuite/ld-m68k/isaaplus.d b/ld/testsuite/ld-m68k/isaaplus.d new file mode 100644 index 00000000000..88623ce7df6 --- /dev/null +++ b/ld/testsuite/ld-m68k/isaaplus.d @@ -0,0 +1,7 @@ + +.*: file format elf32-m68k + +Program Header: +#... +private flags = 3: \[isa A\+\] + diff --git a/ld/testsuite/ld-m68k/isaaplus.s b/ld/testsuite/ld-m68k/isaaplus.s new file mode 100644 index 00000000000..5b0a0b82bd9 --- /dev/null +++ b/ld/testsuite/ld-m68k/isaaplus.s @@ -0,0 +1,3 @@ + .arch isaaplus + + nop diff --git a/ld/testsuite/ld-m68k/isab-float.d b/ld/testsuite/ld-m68k/isab-float.d new file mode 100644 index 00000000000..3547ea71c35 --- /dev/null +++ b/ld/testsuite/ld-m68k/isab-float.d @@ -0,0 +1,7 @@ + +.*: file format elf32-m68k + +Program Header: +#... +private flags = 8045: \[cfv4e\] \[isa B\] \[float\] + diff --git a/ld/testsuite/ld-m68k/isab-float.s b/ld/testsuite/ld-m68k/isab-float.s new file mode 100644 index 00000000000..3889d0d61e1 --- /dev/null +++ b/ld/testsuite/ld-m68k/isab-float.s @@ -0,0 +1,3 @@ + .arch isab,float + + nop diff --git a/ld/testsuite/ld-m68k/isab-nousp.s b/ld/testsuite/ld-m68k/isab-nousp.s new file mode 100644 index 00000000000..1e52357754e --- /dev/null +++ b/ld/testsuite/ld-m68k/isab-nousp.s @@ -0,0 +1,3 @@ + .arch isab,no-usp + + nop diff --git a/ld/testsuite/ld-m68k/isab.d b/ld/testsuite/ld-m68k/isab.d new file mode 100644 index 00000000000..c5b0134566b --- /dev/null +++ b/ld/testsuite/ld-m68k/isab.d @@ -0,0 +1,7 @@ + +.*: file format elf32-m68k + +Program Header: +#... +private flags = 5: \[isa B\] + diff --git a/ld/testsuite/ld-m68k/isab.s b/ld/testsuite/ld-m68k/isab.s new file mode 100644 index 00000000000..3f93db7540b --- /dev/null +++ b/ld/testsuite/ld-m68k/isab.s @@ -0,0 +1,3 @@ + .arch isab + + nop diff --git a/ld/testsuite/ld-m68k/m68k.exp b/ld/testsuite/ld-m68k/m68k.exp new file mode 100644 index 00000000000..5323317486c --- /dev/null +++ b/ld/testsuite/ld-m68k/m68k.exp @@ -0,0 +1,47 @@ +# Expect script for run_dump_test based ld-m68k tests. +# Copyright 2006 Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. +# +# Test m68k object merging + +if { ![is_elf_format] || ![istarget m68k-*-*] } { + return +} + +# List contains test-items with 3 items followed by 2 lists: +# 0:name 1:ld options 2:assembler options +# 3:filenames of assembler files 4: action and options. 5: name of output file + +# Actions: +# objdump: Apply objdump options on result. Compare with regex (last arg). +# nm: Apply nm options on result. Compare with regex (last arg). +# readelf: Apply readelf options on result. Compare with regex (last arg). + +set m68k_mergeok_tests { + {"merge isa-a isa-a:nodiv" "-T merge.ld" "" + {isaa.s isaa-nodiv.s} {{objdump -p isaa.d}} "isaa"} + {"merge isa-a isa-b" "-T merge.ld" "" + {isaa.s isab.s} {{objdump -p isab.d}} "isab"} + {"merge isa-a isa-aplus" "-T merge.ld" "" + {isaa.s isaaplus.s} {{objdump -p isaaplus.d}} "isaplus"} + {"merge isa-b isa-b:nousp" "-T merge.ld" "" + {isab.s isab-nousp.s} {{objdump -p isab.d}} "isab"} + {"merge isa-a isa-a:mac" "-T merge.ld" "" + {isaa.s isaa-mac.s} {{objdump -p isaa-mac.d}} "isaa-mac"} + {"merge isa-b isa-b:float" "-T merge.ld" "" + {isab.s isab-float.s} {{objdump -p isab-float.d}} "isab-float"}} + +run_ld_link_tests $m68k_mergeok_tests diff --git a/ld/testsuite/ld-m68k/merge.ld b/ld/testsuite/ld-m68k/merge.ld new file mode 100644 index 00000000000..ed2acfe1d53 --- /dev/null +++ b/ld/testsuite/ld-m68k/merge.ld @@ -0,0 +1,9 @@ +OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", + "elf32-m68k") +OUTPUT_ARCH(m68k) +ENTRY(_start) + +SECTIONS { + + .text : {_start = .; *(.text)} +} -- cgit v1.2.3