This is the mail archive of the binutils@sources.redhat.com 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: Fix orphaned LO16 relocs in expr1


Hello,

 This is a follow-on patch to the "mips-hilo-reloc-sort" one.  There are a
few orphaned LO16 relocs in the "expr1" test case.  There are two possible 
ways to deal with them: the test can either be left unchanged and an 
appropriated stderr output pattern be added of modified to add missing 
HI16 counterparts.  I think the latter is cleaner.

2004-06-28  Maciej W. Rozycki  <macro@linux-mips.org>

	* gas/mips/expr1.s: Add matching HI16 relocs.
	* gas/mips/expr1.d: Update accordingly.

 This has been tested for the mipsel-linux-gnu target with no new
regressions and fixing a failure revealed by the "mips-hilo-reloc-sort"
patch in this test case.

 This is the last patch in the series.  With the whole set applied there
are no new regressions.

 OK to apply?

  Maciej

binutils-2.15.91-20040625-mips-reloc-orphan.patch
diff -up --recursive --new-file binutils-2.15.91-20040625.macro/gas/testsuite/gas/mips/expr1.d binutils-2.15.91-20040625/gas/testsuite/gas/mips/expr1.d
--- binutils-2.15.91-20040625.macro/gas/testsuite/gas/mips/expr1.d	2003-02-07 15:06:33.000000000 +0000
+++ binutils-2.15.91-20040625/gas/testsuite/gas/mips/expr1.d	2004-06-28 01:20:37.000000000 +0000
@@ -7,13 +7,17 @@
 Disassembly of section \.text:
 
 0+00 <foo>:
-   0:	8c840000 	lw	\$4,0\(\$4\)
-			0: R_MIPS_LO16	foo
-   4:	8c840038 	lw	\$4,56\(\$4\)
-   8:	8c840008 	lw	\$4,8\(\$4\)
-			8: R_MIPS_LO16	foo
-   c:	8c840008 	lw	\$4,8\(\$4\)
-			c: R_MIPS_LO16	foo
+   0:	3c040000 	lui	\$4,0x0
+			0: R_MIPS_HI16	foo
+   4:	8c840000 	lw	\$4,0\(\$4\)
+			4: R_MIPS_LO16	foo
+   8:	8c840038 	lw	\$4,56\(\$4\)
+   c:	3c040000 	lui	\$4,0x0
+			c: R_MIPS_HI16	foo
   10:	8c840008 	lw	\$4,8\(\$4\)
 			10: R_MIPS_LO16	foo
+  14:	8c840008 	lw	\$4,8\(\$4\)
+			14: R_MIPS_LO16	foo
+  18:	8c840008 	lw	\$4,8\(\$4\)
+			18: R_MIPS_LO16	foo
 	\.\.\.
diff -up --recursive --new-file binutils-2.15.91-20040625.macro/gas/testsuite/gas/mips/expr1.s binutils-2.15.91-20040625/gas/testsuite/gas/mips/expr1.s
--- binutils-2.15.91-20040625.macro/gas/testsuite/gas/mips/expr1.s	2003-02-07 15:06:33.000000000 +0000
+++ binutils-2.15.91-20040625/gas/testsuite/gas/mips/expr1.s	2004-06-28 01:16:29.000000000 +0000
@@ -1,8 +1,10 @@
 	.globl	foo
 	.ent	foo
 foo:
+	lui	$4,%hi(foo)
 	lw	$4,%lo(foo)($4)
 	lw	$4,((10 + 4) * 4)($4)
+	lui	$4,%hi (2 * 4) + foo
 	lw	$4,%lo (2 * 4) + foo($4)
 	lw	$4,%lo((2 * 4) + foo)($4)
 	lw	$4,(((%lo ((2 * 4) + foo))))($4)


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