This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] MIPS/GAS: Enable NewABI tests for mips-sde-elf
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: <binutils at sourceware dot org>
- Cc: Richard Sandiford <rdsandiford at googlemail dot com>
- Date: Wed, 16 Nov 2011 13:51:20 +0000
- Subject: [PATCH] MIPS/GAS: Enable NewABI tests for mips-sde-elf
Hi,
Binutils for the mips-sde-elf target have had NewABI backends enabled
since time immemorial, however the GAS NewABI tests have never got enabled
for that target. Here's a change to make that happen now.
This change has revealed some more alignment-related trailing NOP
failures; I have fixed them in a mostly obvious manner in the individual
test cases as appropriate. The n32-consec.s change is a bit unobvious,
but I have verified the original intent of this case to make sure this is
not going to affect coverage.
Needless to say no regressions for mips-sde-elf. OK to apply?
2011-11-16 Maciej W. Rozycki <macro@codesourcery.com>
gas/testsuite/
* gas/mips/mips.exp (has_newabi): Also set for mips*-sde-elf*.
* gas/mips/elf-rel-got-n32.s: Adjust padding.
* gas/mips/elf-rel-got-n64.s: Likewise.
* gas/mips/elf-rel23.s: Likewise.
* gas/mips/n32-consec.s: Likewise.
* gas/mips/elf-rel-xgot-n32.d: Update accordingly.
* gas/mips/elf-rel-xgot-n64.d: Likewise.
* gas/mips/elf-rel23.d: Likewise.
* gas/mips/elf-rel23a.d: Likewise.
* gas/mips/elf-rel23b.d: Likewise.
I wonder if we should wrap these long expr lines BTW, hmm...
Maciej
binutils-gas-test-newabi.diff
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips.exp
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips.exp 2011-11-02 22:54:42.000000000 +0000
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips.exp 2011-11-02 22:59:25.345931446 +0000
@@ -429,7 +429,7 @@ if { [istarget mips*-*-vxworks*] } {
set ecoff [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ]
set aout [expr [istarget *-*-bsd*] || [istarget *-*-openbsd*] ]
set addr32 [expr [istarget mipstx39*-*-*] || [istarget mips-*-linux*] || [istarget mipsel-*-linux*] || [istarget mips*-*-ecoff]]
- set has_newabi [expr [istarget *-*-irix6*] || [istarget mips64*-*-linux*]]
+ set has_newabi [expr [istarget *-*-irix6*] || [istarget mips64*-*-linux*] || [istarget "mips*-sde-elf*"]]
set no_mips16 [expr !$elf]
set no_micromips [expr !$elf]
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel-got-n32.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/elf-rel-got-n32.s 2011-10-05 17:51:40.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel-got-n32.s 2011-11-02 23:03:15.825919007 +0000
@@ -137,6 +137,7 @@
b .Lfn2
# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 2
.space 8
.end fn
@@ -146,6 +147,11 @@
.type fn2,@function
fn2:
.Lfn2:
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 2
+ .space 8
+
.end fn2
.globl __start
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel-got-n64.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/elf-rel-got-n64.s 2011-10-05 17:51:40.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel-got-n64.s 2011-11-02 23:04:41.455919248 +0000
@@ -137,7 +137,8 @@
ld $5,dl2+34($5)
b .Lfn2
-# Force at least 8 (non-deddlay-slot) zero bytes, to make 'objdump' print ...
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 2
.space 8
.end fn
@@ -147,6 +148,11 @@
.type fn2,@function
fn2:
.Lfn2:
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 2
+ .space 8
+
.end fn2
.globl __start
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel-xgot-n32.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/elf-rel-xgot-n32.d 2011-10-05 17:51:40.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel-xgot-n32.d 2011-11-03 00:19:47.395479928 +0000
@@ -577,3 +577,4 @@
000005f0 <fn\+0x5f0> 10000003 b 00000600 <fn2>
000005f4 <fn\+0x5f4> 00000000 nop
\.\.\.
+ \.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel-xgot-n64.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/elf-rel-xgot-n64.d 2011-10-05 17:51:40.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel-xgot-n64.d 2011-11-03 00:19:50.285874544 +0000
@@ -953,3 +953,4 @@
00000000000005f0 <fn\+0x5f0> 10000003 b 0000000000000600 <fn2>
00000000000005f4 <fn\+0x5f4> 00000000 nop
\.\.\.
+ \.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel23.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/elf-rel23.d 2011-10-05 17:51:41.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel23.d 2011-11-02 23:07:14.665921409 +0000
@@ -17,3 +17,4 @@
.*: R_MIPS_SUB \*ABS\*
.*: R_MIPS_LO16 \*ABS\*
.*: 0384e02d daddu \$28,\$28,\$4
+ \.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel23.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/elf-rel23.s 2011-10-05 17:51:40.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel23.s 2011-11-02 23:06:05.205930471 +0000
@@ -4,3 +4,7 @@
foo:
.cpsetup $4,$5,foo
.end foo
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 2
+ .space 8
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel23a.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/elf-rel23a.d 2011-10-05 17:51:40.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel23a.d 2011-11-02 23:07:19.145946496 +0000
@@ -18,3 +18,4 @@
.*: R_MIPS_SUB \*ABS\*
.*: R_MIPS_LO16 \*ABS\*
.*: 0384e02d daddu \$28,\$28,\$4
+ \.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel23b.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/elf-rel23b.d 2011-10-05 17:51:40.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel23b.d 2011-11-02 23:07:32.045902264 +0000
@@ -13,4 +13,4 @@
.*: R_MIPS_HI16 __gnu_local_gp
.*: 279c0000 addiu \$28,\$28,0
.*: R_MIPS_LO16 __gnu_local_gp
-.*: 00000000 nop
+ \.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel28-n32.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/elf-rel28-n32.d 2011-10-05 17:51:40.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel28-n32.d 2011-11-02 23:09:14.665919372 +0000
@@ -93,4 +93,4 @@
.*: R_MIPS_TLS_TPREL_LO16 bar
.*: fc840000 sd a0,0\(a0\)
.*: R_MIPS_TLS_GOTTPREL bar
- ...
+ \.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel28.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/elf-rel28.s 2011-10-05 17:51:40.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/elf-rel28.s 2011-11-02 23:09:33.395901128 +0000
@@ -46,3 +46,7 @@
sd $4,%tprel_lo(bar)($4)
sd $4,%gottprel(bar)($4)
.end foo
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 2
+ .space 8
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/n32-consec.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/n32-consec.s 2011-10-05 17:51:40.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/n32-consec.s 2011-11-02 23:13:56.575450267 +0000
@@ -1,4 +1,13 @@
.text
.long .
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 2
+ .space 8
+
.data
.long .+4
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 2
+ .space 8