diff options
author | Maciej W. Rozycki <macro@orcam.me.uk> | 2023-06-15 04:45:03 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@orcam.me.uk> | 2023-06-15 04:45:03 +0100 |
commit | 13527d85aff4cd393a51f96635813eccb6d7d4bb (patch) | |
tree | a6ec2cb8d56f12726acd77c33160fcbfb99a8ea7 /ld | |
parent | 3c0afdb789887984f13efd7a4c47ce8de265b02d (diff) | |
download | binutils-13527d85aff4cd393a51f96635813eccb6d7d4bb.zip binutils-13527d85aff4cd393a51f96635813eccb6d7d4bb.tar.gz binutils-13527d85aff4cd393a51f96635813eccb6d7d4bb.tar.bz2 |
Revert "MIPS: fix r6 testsuites"
This reverts commit ffc528aed56b9e2c171137da28690a9bb6861b0b. It was
applied unapproved.
Diffstat (limited to 'ld')
26 files changed, 150 insertions, 208 deletions
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-01.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-01.d index 71bce95..24d051d 100644 --- a/ld/testsuite/ld-mips-elf/attr-gnu-4-01.d +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-01.d @@ -1,6 +1,5 @@ #source: attr-gnu-4-0.s #source: attr-gnu-4-1.s -#as: -march=from-abi #ld: -r #readelf: -A diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-11.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-11.d index 12268fb..ce94a81 100644 --- a/ld/testsuite/ld-mips-elf/attr-gnu-4-11.d +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-11.d @@ -1,6 +1,5 @@ #source: attr-gnu-4-1.s #source: attr-gnu-4-1.s -#as: -march=from-abi #ld: -r #readelf: -A diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-40.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-40.d index 67f2bdf..6aa22b9 100644 --- a/ld/testsuite/ld-mips-elf/attr-gnu-4-40.d +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-40.d @@ -1,6 +1,5 @@ #source: attr-gnu-4-4.s -W #source: attr-gnu-4-0.s -#as: -march=from-abi #ld: -r #error: \A[^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n #error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-41.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-41.d index 029d0ed..49f2137 100644 --- a/ld/testsuite/ld-mips-elf/attr-gnu-4-41.d +++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-41.d @@ -1,6 +1,5 @@ #source: attr-gnu-4-4.s -W #source: attr-gnu-4-1.s -#as: -march=from-abi #ld: -r #error: \A[^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n #error: [^\n]*: warning: .* uses -mips32r2 -mfp64 \(12 callee-saved\) \(set by .*\), .* uses -mdouble-float\n diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-00.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-00.d index a8a2aaa..2f8e5f0 100644 --- a/ld/testsuite/ld-mips-elf/attr-gnu-8-00.d +++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-00.d @@ -1,6 +1,5 @@ #source: attr-gnu-8-0.s #source: attr-gnu-8-0.s -#as: -march=from-abi #ld: -r #readelf: -A diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-01.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-01.d index 82006ff..e2cda33 100644 --- a/ld/testsuite/ld-mips-elf/attr-gnu-8-01.d +++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-01.d @@ -1,6 +1,5 @@ #source: attr-gnu-8-0.s #source: attr-gnu-8-1.s -#as: -march=from-abi #ld: -r #readelf: -A diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-02.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-02.d index 9f08a43..54b196f 100644 --- a/ld/testsuite/ld-mips-elf/attr-gnu-8-02.d +++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-02.d @@ -1,6 +1,5 @@ #source: attr-gnu-8-0.s #source: attr-gnu-8-2.s -#as: -march=from-abi #ld: -r #readelf: -A diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-10.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-10.d index 9796282..f7c512b 100644 --- a/ld/testsuite/ld-mips-elf/attr-gnu-8-10.d +++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-10.d @@ -1,6 +1,5 @@ #source: attr-gnu-8-1.s #source: attr-gnu-8-0.s -#as: -march=from-abi #ld: -r #readelf: -A diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-11.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-11.d index 8d3cf40..be87af4 100644 --- a/ld/testsuite/ld-mips-elf/attr-gnu-8-11.d +++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-11.d @@ -1,6 +1,5 @@ #source: attr-gnu-8-1.s #source: attr-gnu-8-1.s -#as: -march=from-abi #ld: -r #readelf: -A diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-20.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-20.d index 02abcc7..05f4da0 100644 --- a/ld/testsuite/ld-mips-elf/attr-gnu-8-20.d +++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-20.d @@ -1,6 +1,5 @@ #source: attr-gnu-8-2.s #source: attr-gnu-8-0.s -#as: -march=from-abi #ld: -r #readelf: -A diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-8-22.d b/ld/testsuite/ld-mips-elf/attr-gnu-8-22.d index 164bc25..908ce4f 100644 --- a/ld/testsuite/ld-mips-elf/attr-gnu-8-22.d +++ b/ld/testsuite/ld-mips-elf/attr-gnu-8-22.d @@ -1,6 +1,5 @@ #source: attr-gnu-8-2.s #source: attr-gnu-8-2.s -#as: -march=from-abi #ld: -r #readelf: -A diff --git a/ld/testsuite/ld-mips-elf/emit-relocs-1.d b/ld/testsuite/ld-mips-elf/emit-relocs-1.d index 32e15a2..0de0729 100644 --- a/ld/testsuite/ld-mips-elf/emit-relocs-1.d +++ b/ld/testsuite/ld-mips-elf/emit-relocs-1.d @@ -23,7 +23,7 @@ OFFSET +TYPE +VALUE Contents of section \.text: - 80000 03e0000[89] 00000000 00000000 00000000 .* + 80000 03e00008 00000000 00000000 00000000 .* Contents of section \.merge1: 80400 666c7574 74657200 flutter.* Contents of section \.merge2: diff --git a/ld/testsuite/ld-mips-elf/gp-disp-sym.s b/ld/testsuite/ld-mips-elf/gp-disp-sym.s index 3b06e71..c6380ba 100644 --- a/ld/testsuite/ld-mips-elf/gp-disp-sym.s +++ b/ld/testsuite/ld-mips-elf/gp-disp-sym.s @@ -2,4 +2,4 @@ .text foo: lui $t0, %hi(_gp_disp) - addiu $t0, $t0, %lo(_gp_disp) + addi $t0, $t0, %lo(_gp_disp) diff --git a/ld/testsuite/ld-mips-elf/jalr3.dd b/ld/testsuite/ld-mips-elf/jalr3.dd index 5c9d83f..6b6d484 100644 --- a/ld/testsuite/ld-mips-elf/jalr3.dd +++ b/ld/testsuite/ld-mips-elf/jalr3.dd @@ -9,6 +9,6 @@ Disassembly of section \.text: c: 00000000 nop 0+000010 <\$bar>: - 10: 03e0000[89] jr ra + 10: 03e00008 jr ra 14: 00000000 nop \.\.\. diff --git a/ld/testsuite/ld-mips-elf/jalx-1.d b/ld/testsuite/ld-mips-elf/jalx-1.d index 80c3be2..f082628 100644 --- a/ld/testsuite/ld-mips-elf/jalx-1.d +++ b/ld/testsuite/ld-mips-elf/jalx-1.d @@ -1,5 +1,5 @@ #name: MIPS jalx-1 -#source: jalx-1.s -march=from-abi +#source: jalx-1.s #ld: -T jalx-1.ld #objdump: -d diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp index ff9635e..920bb12 100644 --- a/ld/testsuite/ld-mips-elf/mips-elf.exp +++ b/ld/testsuite/ld-mips-elf/mips-elf.exp @@ -72,8 +72,7 @@ proc run_dump_test_abi { abi name args } { set asflags [regsub -- {-march=[^[:blank:]]*} $asflags {}] set args [lreplace $args 0 0] } - set abi_r [regsub "l$" $abi {}] - if !$has_abi($abi_r) { + if !$has_abi($abi) { lappend args {notarget *-*-*} } if { [llength $args] > 0 } { @@ -92,13 +91,6 @@ proc run_dump_test_abi { abi name args } { proc run_dump_test_o32 { name args } { run_dump_test_abi o32 $name [lindex $args 0] } -proc run_dump_test_o32l { name args } { - if {[istarget *-linux*] || [istarget *-img-elf]} { - run_dump_test_abi o32l $name [lindex $args 0] - } else { - run_dump_test_abi o32 $name [lindex $args 0] - } -} # run_dump_test_n32 NAME ARGS # @@ -107,13 +99,6 @@ proc run_dump_test_o32l { name args } { proc run_dump_test_n32 { name args } { run_dump_test_abi n32 $name [lindex $args 0] } -proc run_dump_test_n32l { name args } { - if {[istarget *-linux*] || [istarget *-img-elf]} { - run_dump_test_abi n32l $name [lindex $args 0] - } else { - run_dump_test_abi n32 $name [lindex $args 0] - } -} # run_dump_test_n64 NAME ARGS # @@ -122,13 +107,6 @@ proc run_dump_test_n32l { name args } { proc run_dump_test_n64 { name args } { run_dump_test_abi n64 $name [lindex $args 0] } -proc run_dump_test_n64l { name args } { - if {[istarget *-linux*] || [istarget *-img-elf]} { - run_dump_test_abi n64l $name [lindex $args 0] - } else { - run_dump_test_abi n64 $name [lindex $args 0] - } -} # run_dump_test_eabi NAME ARGS # @@ -161,69 +139,49 @@ set linux_gnu [expr [istarget mips*-*-linux*]] set embedded_elf [expr [istarget mips*-*-elf]] # Set defaults. -# ABI with l tail means legacy, aka pre-R6. -# Please use them, if the test only suite for pre-R6, -# such as mips16/micromips tests. set abi_asflags(o32) "" -set abi_asflags(o32l) "" set abi_asflags(n32) "" -set abi_asflags(n32l) "" set abi_asflags(n64) "" -set abi_asflags(n64l) "" set abi_asflags(eabi) "" set abi_ldflags(o32) "" -set abi_ldflags(o32l) "" set abi_ldflags(n32) "" -set abi_ldflags(n32l) "" set abi_ldflags(n64) "" -set abi_ldflags(n64l) "" set abi_ldflags(eabi) "" # Override as needed. if {[istarget *-*-openbsd*] } { set irixemul 0 -} elseif { [istarget mips*64*-*-linux*] } { - set abi_asflags(o32) -32 - set abi_asflags(o32l) "-32 -march=from-abi" - set abi_asflags(n32) "" - set abi_asflags(n32l) "-n32 -march=from-abi" - set abi_asflags(n64) "-64" - set abi_asflags(n64l) "-march=from-abi -64" +} elseif { [istarget mips64*-*-linux*] } { if [istarget *el-*-*] { + set abi_asflags(o32) -32 set abi_ldflags(o32) -melf32ltsmip - set abi_ldflags(o32l) -melf32ltsmip + set abi_asflags(n64) "-march=from-abi -64" set abi_ldflags(n64) -melf64ltsmip - set abi_ldflags(n64l) -melf64ltsmip } else { + set abi_asflags(o32) -32 set abi_ldflags(o32) -melf32btsmip - set abi_ldflags(o32l) -melf32btsmip + set abi_asflags(n64) "-march=from-abi -64" set abi_ldflags(n64) -melf64btsmip - set abi_ldflags(n64l) -melf64btsmip } set irixemul 0 -} elseif {[istarget *-*-linux*] || [istarget *-img-elf] } { - set abi_asflags(o32) "" - set abi_asflags(o32l) "-march=from-abi" - set abi_asflags(n32) "-n32" - set abi_asflags(n32l) "-n32 -march=from-abi" - set abi_asflags(n64) "-64" - set abi_asflags(n64l) "-64 -march=from-abi" +} elseif {[istarget *-*-linux*] } { if [istarget *el-*-*] { + set abi_asflags(n32) "-march=from-abi -n32" set abi_ldflags(n32) -melf32ltsmipn32 - set abi_ldflags(n32l) -melf32ltsmipn32 + set abi_asflags(n64) "-march=from-abi -64" set abi_ldflags(n64) -melf64ltsmip - set abi_ldflags(n64l) -melf64ltsmip } else { + set abi_asflags(n32) "-march=from-abi -n32" set abi_ldflags(n32) -melf32btsmipn32 - set abi_ldflags(n32l) -melf32btsmipn32 + set abi_asflags(n64) "-march=from-abi -64" set abi_ldflags(n64) -melf64btsmip - set abi_ldflags(n64l) -melf64btsmip } set irixemul 0 } elseif {[istarget *-img-elf*] \ || [istarget *-mti-elf*] \ || [istarget *-sde-elf*] \ || [istarget *-*-netbsd*] \ + || [istarget *-*-linux*] \ || [istarget *-*-sysv4*] } { if [istarget *el-*-*] { set abi_asflags(o32) -32 @@ -347,56 +305,56 @@ run_dump_test "mips16-1" # MIPS branch offset final link checking. run_dump_test "branch-misc-1" run_dump_test "branch-misc-2" -run_dump_test_o32l "branch-absolute" -run_dump_test_o32l "branch-absolute-addend" -run_dump_test_n32l "branch-absolute-n32" -run_dump_test_n32l "branch-absolute-addend-n32" -run_dump_test_n64l "branch-absolute-n64" -run_dump_test_n64l "branch-absolute-addend-n64" - -run_dump_test_o32l "mips16-pcrel-0" -run_dump_test_o32l "mips16-pcrel-1" noarch -run_dump_test_o32l "mips16e2-pcrel-0" noarch -run_dump_test_o32l "mips16e2-pcrel-1" noarch -run_dump_test_o32l "mips16-pcrel-addend-2" -run_dump_test_o32l "mips16-pcrel-addend-6" noarch -run_dump_test_o32l "mips16e2-pcrel-addend-2" noarch -run_dump_test_o32l "mips16e2-pcrel-addend-6" noarch -run_dump_test_n32l "mips16-pcrel-n32-0" -run_dump_test_n32l "mips16-pcrel-n32-1" -run_dump_test_n64l "mips16-pcrel-n64-sym32-0" -run_dump_test_n64l "mips16-pcrel-n64-sym32-1" -run_dump_test_n32l "mips16e2-pcrel-n32-0" noarch -run_dump_test_n32l "mips16e2-pcrel-n32-1" noarch -run_dump_test_n64l "mips16e2-pcrel-n64-sym32-0" noarch -run_dump_test_n64l "mips16e2-pcrel-n64-sym32-1" noarch - -run_dump_test_o32l "mips16-branch-2" -run_dump_test_o32l "mips16-branch-3" -run_dump_test_o32l "mips16-branch-addend-2" -run_dump_test_o32l "mips16-branch-addend-3" -run_dump_test_o32l "mips16-branch-absolute" -run_dump_test_o32l "mips16-branch-absolute-1" -run_dump_test_o32l "mips16-branch-absolute-2" -run_dump_test_o32l "mips16-branch-absolute-addend" -run_dump_test_o32l "mips16-branch-absolute-addend-1" -run_dump_test_n32l "mips16-branch-absolute-n32" -run_dump_test_n32l "mips16-branch-absolute-n32-1" -run_dump_test_n32l "mips16-branch-absolute-n32-2" -run_dump_test_n32l "mips16-branch-absolute-addend-n32" -run_dump_test_n32l "mips16-branch-absolute-addend-n32-1" -run_dump_test_n64l "mips16-branch-absolute-n64" -run_dump_test_n64l "mips16-branch-absolute-n64-1" -run_dump_test_n64l "mips16-branch-absolute-n64-2" -run_dump_test_n64l "mips16-branch-absolute-addend-n64" -run_dump_test_n64l "mips16-branch-absolute-addend-n64-1" - -run_dump_test_o32l "micromips-branch-absolute" -run_dump_test_o32l "micromips-branch-absolute-addend" -run_dump_test_n32l "micromips-branch-absolute-n32" -run_dump_test_n32l "micromips-branch-absolute-addend-n32" -run_dump_test_n64l "micromips-branch-absolute-n64" -run_dump_test_n64l "micromips-branch-absolute-addend-n64" +run_dump_test_o32 "branch-absolute" +run_dump_test_o32 "branch-absolute-addend" +run_dump_test_n32 "branch-absolute-n32" +run_dump_test_n32 "branch-absolute-addend-n32" +run_dump_test_n64 "branch-absolute-n64" +run_dump_test_n64 "branch-absolute-addend-n64" + +run_dump_test_o32 "mips16-pcrel-0" +run_dump_test_o32 "mips16-pcrel-1" noarch +run_dump_test_o32 "mips16e2-pcrel-0" noarch +run_dump_test_o32 "mips16e2-pcrel-1" noarch +run_dump_test_o32 "mips16-pcrel-addend-2" +run_dump_test_o32 "mips16-pcrel-addend-6" +run_dump_test_o32 "mips16e2-pcrel-addend-2" noarch +run_dump_test_o32 "mips16e2-pcrel-addend-6" noarch +run_dump_test_n32 "mips16-pcrel-n32-0" +run_dump_test_n32 "mips16-pcrel-n32-1" +run_dump_test_n64 "mips16-pcrel-n64-sym32-0" +run_dump_test_n64 "mips16-pcrel-n64-sym32-1" +run_dump_test_n32 "mips16e2-pcrel-n32-0" noarch +run_dump_test_n32 "mips16e2-pcrel-n32-1" noarch +run_dump_test_n64 "mips16e2-pcrel-n64-sym32-0" noarch +run_dump_test_n64 "mips16e2-pcrel-n64-sym32-1" noarch + +run_dump_test_o32 "mips16-branch-2" +run_dump_test_o32 "mips16-branch-3" +run_dump_test_o32 "mips16-branch-addend-2" +run_dump_test_o32 "mips16-branch-addend-3" +run_dump_test_o32 "mips16-branch-absolute" +run_dump_test_o32 "mips16-branch-absolute-1" +run_dump_test_o32 "mips16-branch-absolute-2" +run_dump_test_o32 "mips16-branch-absolute-addend" +run_dump_test_o32 "mips16-branch-absolute-addend-1" +run_dump_test_n32 "mips16-branch-absolute-n32" +run_dump_test_n32 "mips16-branch-absolute-n32-1" +run_dump_test_n32 "mips16-branch-absolute-n32-2" +run_dump_test_n32 "mips16-branch-absolute-addend-n32" +run_dump_test_n32 "mips16-branch-absolute-addend-n32-1" +run_dump_test_n64 "mips16-branch-absolute-n64" +run_dump_test_n64 "mips16-branch-absolute-n64-1" +run_dump_test_n64 "mips16-branch-absolute-n64-2" +run_dump_test_n64 "mips16-branch-absolute-addend-n64" +run_dump_test_n64 "mips16-branch-absolute-addend-n64-1" + +run_dump_test_o32 "micromips-branch-absolute" +run_dump_test_o32 "micromips-branch-absolute-addend" +run_dump_test_n32 "micromips-branch-absolute-n32" +run_dump_test_n32 "micromips-branch-absolute-addend-n32" +run_dump_test_n64 "micromips-branch-absolute-n64" +run_dump_test_n64 "micromips-branch-absolute-addend-n64" # Jalx test run_dump_test "jalx-1" @@ -423,69 +381,69 @@ if { $linux_gnu } { "jalx-2"]] } -run_dump_test_o32l "jalx-addend" -run_dump_test_o32l "jalx-local" -run_dump_test_o32l "bal-jalx-addend" -run_dump_test_o32l "bal-jalx-addend-micromips" -run_dump_test_o32l "bal-jalx-local" -run_dump_test_o32l "bal-jalx-local-micromips" -run_dump_test_o32l "bal-jalx-pic" -run_dump_test_o32l "bal-jalx-pic-micromips" -run_dump_test_o32l "bal-jalx-pic-ignore" -run_dump_test_o32l "bal-jalx-pic-ignore-micromips" -run_dump_test_n32l "jalx-addend-n32" -run_dump_test_n32l "jalx-local-n32" -run_dump_test_n32l "bal-jalx-addend-n32" -run_dump_test_n32l "bal-jalx-addend-micromips-n32" -run_dump_test_n32l "bal-jalx-local-n32" -run_dump_test_n32l "bal-jalx-local-micromips-n32" -run_dump_test_n32l "bal-jalx-pic-n32" -run_dump_test_n32l "bal-jalx-pic-micromips-n32" -run_dump_test_n32l "bal-jalx-pic-ignore-n32" -run_dump_test_n32l "bal-jalx-pic-ignore-micromips-n32" -run_dump_test_n64l "jalx-addend-n64" -run_dump_test_n64l "jalx-local-n64" -run_dump_test_n64l "bal-jalx-addend-n64" -run_dump_test_n64l "bal-jalx-addend-micromips-n64" -run_dump_test_n64l "bal-jalx-local-n64" -run_dump_test_n64l "bal-jalx-local-micromips-n64" -run_dump_test_n64l "bal-jalx-pic-n64" -run_dump_test_n64l "bal-jalx-pic-micromips-n64" -run_dump_test_n64l "bal-jalx-pic-ignore-n64" -run_dump_test_n64l "bal-jalx-pic-ignore-micromips-n64" - -run_dump_test_o32l "unaligned-jalx-0" [list [list ld $abi_ldflags(o32)]] -run_dump_test_o32l "unaligned-jalx-1" [list [list ld $abi_ldflags(o32)]] -run_dump_test_o32l "unaligned-jalx-2" [list [list ld $abi_ldflags(o32)]] -run_dump_test_o32l "unaligned-jalx-3" [list [list ld $abi_ldflags(o32)]] -run_dump_test_o32l "unaligned-jalx-mips16-0" [list [list ld $abi_ldflags(o32)]] -run_dump_test_o32l "unaligned-jalx-mips16-1" [list [list ld $abi_ldflags(o32)]] -run_dump_test_o32l "unaligned-jalx-micromips-0" [list [list ld $abi_ldflags(o32)]] -run_dump_test_o32l "unaligned-jalx-micromips-1" [list [list ld $abi_ldflags(o32)]] - -run_dump_test_n32l "unaligned-jalx-addend-0" -run_dump_test_n32l "unaligned-jalx-addend-1" -run_dump_test_n32l "unaligned-jalx-addend-2" -run_dump_test_n32l "unaligned-jalx-addend-3" -run_dump_test_n32l "unaligned-jalx-addend-mips16-0" -run_dump_test_n32l "unaligned-jalx-addend-mips16-1" -run_dump_test_n32l "unaligned-jalx-addend-micromips-0" -run_dump_test_n32l "unaligned-jalx-addend-micromips-1" +run_dump_test_o32 "jalx-addend" +run_dump_test_o32 "jalx-local" +run_dump_test_o32 "bal-jalx-addend" +run_dump_test_o32 "bal-jalx-addend-micromips" +run_dump_test_o32 "bal-jalx-local" +run_dump_test_o32 "bal-jalx-local-micromips" +run_dump_test_o32 "bal-jalx-pic" +run_dump_test_o32 "bal-jalx-pic-micromips" +run_dump_test_o32 "bal-jalx-pic-ignore" +run_dump_test_o32 "bal-jalx-pic-ignore-micromips" +run_dump_test_n32 "jalx-addend-n32" +run_dump_test_n32 "jalx-local-n32" +run_dump_test_n32 "bal-jalx-addend-n32" +run_dump_test_n32 "bal-jalx-addend-micromips-n32" +run_dump_test_n32 "bal-jalx-local-n32" +run_dump_test_n32 "bal-jalx-local-micromips-n32" +run_dump_test_n32 "bal-jalx-pic-n32" +run_dump_test_n32 "bal-jalx-pic-micromips-n32" +run_dump_test_n32 "bal-jalx-pic-ignore-n32" +run_dump_test_n32 "bal-jalx-pic-ignore-micromips-n32" +run_dump_test_n64 "jalx-addend-n64" +run_dump_test_n64 "jalx-local-n64" +run_dump_test_n64 "bal-jalx-addend-n64" +run_dump_test_n64 "bal-jalx-addend-micromips-n64" +run_dump_test_n64 "bal-jalx-local-n64" +run_dump_test_n64 "bal-jalx-local-micromips-n64" +run_dump_test_n64 "bal-jalx-pic-n64" +run_dump_test_n64 "bal-jalx-pic-micromips-n64" +run_dump_test_n64 "bal-jalx-pic-ignore-n64" +run_dump_test_n64 "bal-jalx-pic-ignore-micromips-n64" + +run_dump_test "unaligned-jalx-0" [list [list ld $abi_ldflags(o32)]] +run_dump_test "unaligned-jalx-1" [list [list ld $abi_ldflags(o32)]] +run_dump_test "unaligned-jalx-2" [list [list ld $abi_ldflags(o32)]] +run_dump_test "unaligned-jalx-3" [list [list ld $abi_ldflags(o32)]] +run_dump_test "unaligned-jalx-mips16-0" [list [list ld $abi_ldflags(o32)]] +run_dump_test "unaligned-jalx-mips16-1" [list [list ld $abi_ldflags(o32)]] +run_dump_test "unaligned-jalx-micromips-0" [list [list ld $abi_ldflags(o32)]] +run_dump_test "unaligned-jalx-micromips-1" [list [list ld $abi_ldflags(o32)]] + +run_dump_test_n32 "unaligned-jalx-addend-0" +run_dump_test_n32 "unaligned-jalx-addend-1" +run_dump_test_n32 "unaligned-jalx-addend-2" +run_dump_test_n32 "unaligned-jalx-addend-3" +run_dump_test_n32 "unaligned-jalx-addend-mips16-0" +run_dump_test_n32 "unaligned-jalx-addend-mips16-1" +run_dump_test_n32 "unaligned-jalx-addend-micromips-0" +run_dump_test_n32 "unaligned-jalx-addend-micromips-1" run_dump_test_o32 "unaligned-branch" noarch -run_dump_test_n32l "unaligned-branch-2" -run_dump_test_n32l "unaligned-branch-ignore-2" +run_dump_test_n32 "unaligned-branch-2" +run_dump_test_n32 "unaligned-branch-ignore-2" run_dump_test_n32 "unaligned-branch-r6-1" run_dump_test_n32 "unaligned-branch-ignore-r6-1" run_dump_test_n32 "unaligned-branch-r6-2" noarch -run_dump_test_n32l "unaligned-branch-mips16" -run_dump_test_n32l "unaligned-branch-ignore-mips16" -run_dump_test_n32l "unaligned-branch-micromips" -run_dump_test_n32l "unaligned-branch-ignore-micromips" -run_dump_test_n32l "unaligned-jump" -run_dump_test_n32l "unaligned-jump-mips16" -run_dump_test_n32l "unaligned-jump-micromips" +run_dump_test_n32 "unaligned-branch-mips16" +run_dump_test_n32 "unaligned-branch-ignore-mips16" +run_dump_test_n32 "unaligned-branch-micromips" +run_dump_test_n32 "unaligned-branch-ignore-micromips" +run_dump_test_n32 "unaligned-jump" +run_dump_test_n32 "unaligned-jump-mips16" +run_dump_test_n32 "unaligned-jump-micromips" run_dump_test_o32 "unaligned-lwpc-0" noarch run_dump_test_o32 "unaligned-lwpc-1" noarch @@ -516,11 +474,11 @@ if { $linux_gnu } { } if { $embedded_elf } { - run_dump_test_n32l "elf-rel-got-n32-embed" {{as -EB} {ld -EB}} - run_dump_test_n32l "elf-rel-xgot-n32-embed" {{as -EB} {ld -EB}} + run_dump_test_n32 "elf-rel-got-n32-embed" {{as -EB} {ld -EB}} + run_dump_test_n32 "elf-rel-xgot-n32-embed" {{as -EB} {ld -EB}} } else { - run_dump_test_n32l "elf-rel-got-n32" {{as -EB} {ld -EB}} - run_dump_test_n32l "elf-rel-xgot-n32" {{as -EB} {ld -EB}} + run_dump_test_n32 "elf-rel-got-n32" {{as -EB} {ld -EB}} + run_dump_test_n32 "elf-rel-xgot-n32" {{as -EB} {ld -EB}} } if { $irix } { run_dump_test_n64 "elf-rel-got-n64-irix" @@ -529,8 +487,8 @@ if { $irix } { run_dump_test_n64 "elf-rel-got-n64-embed" {{as -EB} {ld -EB}} run_dump_test_n64 "elf-rel-xgot-n64-embed" {{as -EB} {ld -EB}} } else { - run_dump_test_n64l "elf-rel-got-n64" {{as -EB} {ld -EB}} - run_dump_test_n64l "elf-rel-xgot-n64" {{as -EB} {ld -EB}} + run_dump_test_n64 "elf-rel-got-n64" {{as -EB} {ld -EB}} + run_dump_test_n64 "elf-rel-xgot-n64" {{as -EB} {ld -EB}} } run_dump_test_n32 "relax-jalr-n32" {{as -EB} {ld -EB}} @@ -837,8 +795,8 @@ run_dump_test_n32 "jalbal" noarch run_dump_test "mode-change-error-1" -run_dump_test_o32l "mips16-hilo" -run_dump_test_n32l "mips16-hilo-n32" +run_dump_test_o32 "mips16-hilo" +run_dump_test_n32 "mips16-hilo-n32" if { $linux_gnu } { run_dump_test_n32 "textrel-1" @@ -907,8 +865,8 @@ if { $linux_gnu && $has_abi(o32) } { set base_syms 1 foreach { isa aflag lflag suffix } \ { MIPS -march=mips1 "" "" \ - microMIPS "-mips32r2 -mmicromips" "" -micromips \ - "microMIPS insn32" "-mips32r2 -mmicromips -minsn32" --insn32 \ + microMIPS -mmicromips "" -micromips \ + "microMIPS insn32" "-mmicromips -minsn32" --insn32 \ -micromips-insn32 } { foreach dynsym { 7fff 8000 fff0 10000 2fe80 } { run_ld_link_tests \ @@ -1248,7 +1206,7 @@ foreach { abi } $abis { [list \ "MIPS JALR reloc unaligned/cross-mode link test ($abi)" \ "$abi_ldflags($abi) -T jalr3.ld" "" \ - "$abi_asflags($abi) -march=from-abi" \ + "$abi_asflags($abi)" \ [list ../../../gas/testsuite/gas/mips/jalr4.s] \ [list "objdump {-d --prefix-addresses --show-raw-insn} jalr4.dd"] \ "jalr4-${abi}"] \ @@ -1286,8 +1244,6 @@ proc run_mips_plt_test { name abi filter micromips suffix {extra {}} } { append as_flags " --defsym micromips=$micromips --defsym $abi=1" if {[string equal $abi o32]} { append as_flags " -march=mips2" - } else { - append as_flags " -march=mips3" } set ld_flags "$abi_ldflags($abi) -T compressed-plt-1.ld" set dynobj "tmpdir/compressed-plt-1-${abi}-dyn.so" @@ -1427,7 +1383,7 @@ if { $has_abi(o32) } { run_ld_link_tests [list \ [list \ "PR ld/21334 MIPS GOT16 relocation in static binary" \ - "$abi_ldflags(o32) -e foo -T pr21334.ld" "" "$abi_asflags(o32) -march=from-abi" \ + "$abi_ldflags(o32) -e foo -T pr21334.ld" "" "$abi_asflags(o32)" \ {pr21334.s} \ {{objdump {-d --prefix-addresses} pr21334.dd} \ {readelf -A pr21334.gd}} \ @@ -1462,7 +1418,7 @@ if { $has_abi(o32) } { [list \ "microMIPS link PIC branch relaxation with offset" \ "$abi_ldflags(o32) -shared -T relax-offset.ld" "" \ - "$abi_asflags(o32) -relax-branch -mips32r2 -mmicromips" \ + "$abi_asflags(o32) -relax-branch -mmicromips" \ {../../../gas/testsuite/gas/mips/relax-offset.s} \ {{objdump \ {-d --prefix-addresses --show-raw-insn} \ @@ -1615,7 +1571,7 @@ proc run_mips_undefweak_test { name abi args } { "$name" \ "$abi_ldflags($abi) -e foo -T pr21375${scrsuf}.ld ${ldxtra}" \ "" \ - "$abi_asflags($abi) -march=from-abi ${asxtra}" \ + "$abi_asflags($abi) ${asxtra}" \ [list pr21375${srcsuf}.s] \ [list \ [list objdump -d pr21375${objsuf}.dd] \ @@ -1694,11 +1650,11 @@ run_dump_test "pic-reloc-2" run_dump_test "pic-reloc-3" run_dump_test "pic-reloc-4" run_dump_test_o32 "pic-reloc-5" -run_dump_test_o32l "pic-reloc-5" [list [list name (microMIPS)] \ +run_dump_test_o32 "pic-reloc-5" [list [list name (microMIPS)] \ [list as "-mmicromips"]] -run_dump_test_o32l "pic-reloc-6" +run_dump_test_o32 "pic-reloc-6" run_dump_test_n64 "pic-reloc-7" -run_dump_test_n64l "pic-reloc-7" [list [list name (microMIPS)] \ +run_dump_test_n64 "pic-reloc-7" [list [list name (microMIPS)] \ [list as "-mmicromips"]] run_dump_test_o32 "reloc-pcrel-r6" diff --git a/ld/testsuite/ld-mips-elf/mips16-1.d b/ld/testsuite/ld-mips-elf/mips16-1.d index f2d5caa..77d1316 100644 --- a/ld/testsuite/ld-mips-elf/mips16-1.d +++ b/ld/testsuite/ld-mips-elf/mips16-1.d @@ -1,5 +1,5 @@ -#source: mips16-1a.s -no-mips16 -march=from-abi -#source: mips16-1b.s -mips16 -march=from-abi +#source: mips16-1a.s -no-mips16 +#source: mips16-1b.s -mips16 #ld: -r #objdump: -pd diff --git a/ld/testsuite/ld-mips-elf/mips16-and-micromips.d b/ld/testsuite/ld-mips-elf/mips16-and-micromips.d index 4b89ae3..6d740fe 100644 --- a/ld/testsuite/ld-mips-elf/mips16-and-micromips.d +++ b/ld/testsuite/ld-mips-elf/mips16-and-micromips.d @@ -1,5 +1,5 @@ #name: MIPS16 and microMIPS interlink -#source: ../../../gas/testsuite/gas/mips/nop.s -mips16 -march=from-abi -#source: ../../../gas/testsuite/gas/mips/nop.s -mmicromips -march=from-abi +#source: ../../../gas/testsuite/gas/mips/nop.s -mips16 +#source: ../../../gas/testsuite/gas/mips/nop.s -mmicromips #ld: -e0 #error: \A.*: .*\.o: ASE mismatch: linking microMIPS module with previous MIPS16 modules[\n\r]+.*: failed to merge target specific data of file .*\.o\Z diff --git a/ld/testsuite/ld-mips-elf/mode-change-error-1.d b/ld/testsuite/ld-mips-elf/mode-change-error-1.d index 90636c2..afa54d8 100644 --- a/ld/testsuite/ld-mips-elf/mode-change-error-1.d +++ b/ld/testsuite/ld-mips-elf/mode-change-error-1.d @@ -1,6 +1,6 @@ #name: Mode Change Error 1 -#source: mode-change-error-1a.s -march=from-abi -#source: mode-change-error-1b.s -march=from-abi +#source: mode-change-error-1a.s +#source: mode-change-error-1b.s #ld: -e 0x8000000 #error: \A[^\n]*: in function `main':\n #error: \(\.text\+0x0\): unsupported jump between ISA modes; consider recompiling with interlinking enabled\n diff --git a/ld/testsuite/ld-mips-elf/n64-plt-1.dd b/ld/testsuite/ld-mips-elf/n64-plt-1.dd index 51d654a..4c24a9a 100644 --- a/ld/testsuite/ld-mips-elf/n64-plt-1.dd +++ b/ld/testsuite/ld-mips-elf/n64-plt-1.dd @@ -15,7 +15,7 @@ Disassembly of section \.plt: 00000000100002a0 <bar@plt>: 100002a0: 3c0f7fff lui t3,0x7fff 100002a4: ddf97ff8 ld t9,32760\(t3\) - 100002a8: 0320000[89] jr t9 + 100002a8: 03200008 jr t9 100002ac: 25f87ff8 addiu t8,t3,32760 Disassembly of section \.text: diff --git a/ld/testsuite/ld-mips-elf/n64-plt-4.dd b/ld/testsuite/ld-mips-elf/n64-plt-4.dd index 71fee33..01c5025 100644 --- a/ld/testsuite/ld-mips-elf/n64-plt-4.dd +++ b/ld/testsuite/ld-mips-elf/n64-plt-4.dd @@ -15,7 +15,7 @@ ffffffff1000029c: 2718fffe addiu t8,t8,-2 ffffffff100002a0 <bar@plt>: ffffffff100002a0: 3c0f8000 lui t3,0x8000 ffffffff100002a4: ddf98010 ld t9,-32752\(t3\) -ffffffff100002a8: 0320000[89] jr t9 +ffffffff100002a8: 03200008 jr t9 ffffffff100002ac: 25f88010 addiu t8,t3,-32752 Disassembly of section \.text: diff --git a/ld/testsuite/ld-mips-elf/nan-legacy.d b/ld/testsuite/ld-mips-elf/nan-legacy.d index 0d90432..8dacc06 100644 --- a/ld/testsuite/ld-mips-elf/nan-legacy.d +++ b/ld/testsuite/ld-mips-elf/nan-legacy.d @@ -1,6 +1,5 @@ #source: nan-legacy.s #source: nan-legacy.s -#as: -march=from-abi #ld: -r #objdump: -p diff --git a/ld/testsuite/ld-mips-elf/nan-mixed-1.d b/ld/testsuite/ld-mips-elf/nan-mixed-1.d index c7e9570..9bc524c 100644 --- a/ld/testsuite/ld-mips-elf/nan-mixed-1.d +++ b/ld/testsuite/ld-mips-elf/nan-mixed-1.d @@ -1,6 +1,5 @@ #source: nan-legacy.s #source: nan-2008.s -#as: -march=from-abi #ld: -r #error: \A[^\n]*: [^\n]* linking -mnan=2008 module with previous -mnan=legacy modules\n #error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z diff --git a/ld/testsuite/ld-mips-elf/nan-mixed-2.d b/ld/testsuite/ld-mips-elf/nan-mixed-2.d index a96cda0..388d770 100644 --- a/ld/testsuite/ld-mips-elf/nan-mixed-2.d +++ b/ld/testsuite/ld-mips-elf/nan-mixed-2.d @@ -1,6 +1,5 @@ #source: nan-2008.s #source: nan-legacy.s -#as: -march=from-abi #ld: -r #error: \A[^\n]*: [^\n]* linking -mnan=legacy module with previous -mnan=2008 modules\n #error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-2.d b/ld/testsuite/ld-mips-elf/pic-and-nonpic-2.d index e3cc14e..3baf228 100644 --- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-2.d +++ b/ld/testsuite/ld-mips-elf/pic-and-nonpic-2.d @@ -17,6 +17,6 @@ Disassembly of section \.text: 4101c: 27391020 addiu t9,t9,4128 00041020 <foo2>: - 41020: 03e0000[89] jr ra + 41020: 03e00008 jr ra 41024: 00000000 nop \.\.\. diff --git a/ld/testsuite/ld-mips-elf/reloc-3.d b/ld/testsuite/ld-mips-elf/reloc-3.d index 0215016..1ec51c5 100644 --- a/ld/testsuite/ld-mips-elf/reloc-3.d +++ b/ld/testsuite/ld-mips-elf/reloc-3.d @@ -1,5 +1,5 @@ #name: R_MIPS16_GPREL reloc -#source: ../../../gas/testsuite/gas/mips/elf-rel6.s -march=from-abi +#source: ../../../gas/testsuite/gas/mips/elf-rel6.s #objdump: --prefix-addresses -tdr --show-raw-insn #ld: -Ttext 0x20000000 -e 0x20000000 -N |