This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] MIPS/gas: ERET test case failure fixes


Hi,

 Here's a fix for the MIPS ERET test case failures observed by Alan:

> mips64-linux/log0:FAIL: MIPS eret-1 disassembly
> mips64-linux/log0:FAIL: MIPS eret-2 disassembly
> mips64-linux/log0:FAIL: MIPS eret-3 disassembly

These were caused by an incompatible 64-bit ABI used with the 24Kc 
processor.  And then by missing padding at the end to address alignment 
differences among MIPS targets (also seen with 32-bit MIPS/Linux targets).

 Fixed thus in line with other test cases.  This took longer than I 
expected, because I had to extract these bits from a larger patch, which I 
forgot that was the case; sorry about that.  I'll submit the rest 
separately, together with a couple of other patches.

2009-09-12  Maciej W. Rozycki  <macro@linux-mips.org>

	* gas/mips/eret-1.s: Add trailing padding.
	* gas/mips/eret-2.s: Likewise.
	* gas/mips/eret-3.s: Likewise.
	* gas/mips/eret-1.d: Adjust accordingly.  Force a 32-bit ABI.
	* gas/mips/eret-2.d: Likewise.
	* gas/mips/eret-3.d: Likewise.

 Regression tested for the mipsel-linux and mips64-linux targets.  OK to 
apply to the trunk?  As a testsuite fix I don't insist on propagating it 
to 2.20, although there will be no harm from doing so.

  Maciej

binutils-2.20.51-mips-gas-test-eret-fill.patch
Index: binutils-2.20.51-mipsel/gas/testsuite/gas/mips/eret-1.d
===================================================================
--- binutils-2.20.51-mipsel.orig/gas/testsuite/gas/mips/eret-1.d
+++ binutils-2.20.51-mipsel/gas/testsuite/gas/mips/eret-1.d
@@ -1,6 +1,6 @@
 #objdump: -d
 #name: MIPS eret-1 disassembly
-#as: -mfix-24k -march=24kc --no-warn
+#as: -mabi=32 -mfix-24k -march=24kc --no-warn
 
 .*\.o:     file format .*mips.*
 
@@ -39,3 +39,4 @@ Disassembly of section \.text:
   74:	240c0003 	li	t4,3
   78:	240c0003 	li	t4,3
   7c:	42000018 	eret
+	\.\.\.
Index: binutils-2.20.51-mipsel/gas/testsuite/gas/mips/eret-1.s
===================================================================
--- binutils-2.20.51-mipsel.orig/gas/testsuite/gas/mips/eret-1.s
+++ binutils-2.20.51-mipsel/gas/testsuite/gas/mips/eret-1.s
@@ -25,3 +25,6 @@
 	li $t4, 3
 1:	li $t4, 3
 	eret
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+        .space	8
Index: binutils-2.20.51-mipsel/gas/testsuite/gas/mips/eret-2.d
===================================================================
--- binutils-2.20.51-mipsel.orig/gas/testsuite/gas/mips/eret-2.d
+++ binutils-2.20.51-mipsel/gas/testsuite/gas/mips/eret-2.d
@@ -1,6 +1,6 @@
 #objdump: -d
 #name: MIPS eret-2 disassembly
-#as: -mfix-24k -march=24kc --no-warn
+#as: -mabi=32 -mfix-24k -march=24kc --no-warn
 
 .*\.o:     file format .*mips.*
 
@@ -14,3 +14,5 @@ Disassembly of section \.text:
   10:	42000018 	eret
   14:	00000000 	nop
   18:	1000fffd 	b	0x10
+  1c:	00000000 	nop
+	\.\.\.
Index: binutils-2.20.51-mipsel/gas/testsuite/gas/mips/eret-2.s
===================================================================
--- binutils-2.20.51-mipsel.orig/gas/testsuite/gas/mips/eret-2.s
+++ binutils-2.20.51-mipsel/gas/testsuite/gas/mips/eret-2.s
@@ -7,3 +7,6 @@
 	.set	noreorder
 	b	1b
 	.set	reorder
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+        .space	8
Index: binutils-2.20.51-mipsel/gas/testsuite/gas/mips/eret-3.d
===================================================================
--- binutils-2.20.51-mipsel.orig/gas/testsuite/gas/mips/eret-3.d
+++ binutils-2.20.51-mipsel/gas/testsuite/gas/mips/eret-3.d
@@ -1,6 +1,6 @@
 #objdump: -d
 #name: MIPS eret-3 disassembly
-#as: -mfix-24k -march=24kc --no-warn
+#as: -mabi=32 -mfix-24k -march=24kc --no-warn
 
 .*\.o:     file format .*mips.*
 
@@ -16,3 +16,4 @@ Disassembly of section \.text:
   10:	aca40000 	sw	a0,0\(a1\)
   14:	03e00008 	jr	ra
   18:	00000000 	nop
+	\.\.\.
Index: binutils-2.20.51-mipsel/gas/testsuite/gas/mips/eret-3.s
===================================================================
--- binutils-2.20.51-mipsel.orig/gas/testsuite/gas/mips/eret-3.s
+++ binutils-2.20.51-mipsel/gas/testsuite/gas/mips/eret-3.s
@@ -12,3 +12,6 @@ bar:
 1:
 	jr	$31
 	.end	bar
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+        .space	8


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]