public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2] MIPS/GAS: Fix test failures due to jr encoding changes on r6
@ 2023-11-22  9:37 YunQiang Su
  0 siblings, 0 replies; only message in thread
From: YunQiang Su @ 2023-11-22  9:37 UTC (permalink / raw)
  To: nickc; +Cc: binutils, YunQiang Su

On MIPSr6, the encoding of JR instruction has been chaned.
This patch can fix these failures for r6 default triples:
	MIPS branch to a different section
	MIPS branch to a weak symbol
	MIPS PIC option
	MIPS `.option picX' with relaxation 0
	MIPS `.option picX' with relaxation 1
	ST Microelectronics Loongson-2F workarounds of Jump Instruction issue
---
 gas/testsuite/gas/mips/branch-section-1.d   | 2 +-
 gas/testsuite/gas/mips/branch-weak-1.d      | 2 +-
 gas/testsuite/gas/mips/loongson-2f-3.d      | 2 +-
 gas/testsuite/gas/mips/option-pic-1.d       | 2 +-
 gas/testsuite/gas/mips/option-pic-relax-0.d | 2 +-
 gas/testsuite/gas/mips/option-pic-relax-1.d | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gas/testsuite/gas/mips/branch-section-1.d b/gas/testsuite/gas/mips/branch-section-1.d
index 7782d0c0754..08c678d27ed 100644
--- a/gas/testsuite/gas/mips/branch-section-1.d
+++ b/gas/testsuite/gas/mips/branch-section-1.d
@@ -12,6 +12,6 @@ Disassembly of section \.text:
 	\.\.\.
 
 Disassembly of section \.init:
-[0-9a-f]+ <[^>]*> 03e00008 	jr	ra
+[0-9a-f]+ <[^>]*> 03e0000[89] 	jr	ra
 [0-9a-f]+ <[^>]*> 00000000 	nop
 	\.\.\.
diff --git a/gas/testsuite/gas/mips/branch-weak-1.d b/gas/testsuite/gas/mips/branch-weak-1.d
index 859a2ca69fb..349b5d96c8d 100644
--- a/gas/testsuite/gas/mips/branch-weak-1.d
+++ b/gas/testsuite/gas/mips/branch-weak-1.d
@@ -10,6 +10,6 @@ Disassembly of section \.text:
 [ 	]*[0-9a-f]+: R_MIPS_PC16	bar
 [0-9a-f]+ <[^>]*> 00000000 	nop
 	\.\.\.
-[0-9a-f]+ <[^>]*> 03e00008 	jr	ra
+[0-9a-f]+ <[^>]*> 03e0000[89] 	jr	ra
 [0-9a-f]+ <[^>]*> 00000000 	nop
 	\.\.\.
diff --git a/gas/testsuite/gas/mips/loongson-2f-3.d b/gas/testsuite/gas/mips/loongson-2f-3.d
index f3ac2c97742..c31d3abf53a 100644
--- a/gas/testsuite/gas/mips/loongson-2f-3.d
+++ b/gas/testsuite/gas/mips/loongson-2f-3.d
@@ -1,4 +1,4 @@
-#as: -mfix-loongson2f-jump
+#as: -march=loongson2f -mfix-loongson2f-jump
 #objdump: -M reg-names=numeric -dr
 #name: ST Microelectronics Loongson-2F workarounds of Jump Instruction issue
 
diff --git a/gas/testsuite/gas/mips/option-pic-1.d b/gas/testsuite/gas/mips/option-pic-1.d
index da32af6a6ce..612414ae752 100644
--- a/gas/testsuite/gas/mips/option-pic-1.d
+++ b/gas/testsuite/gas/mips/option-pic-1.d
@@ -13,6 +13,6 @@ Disassembly of section \.text:
 [ 	]*[0-9a-f]+: R_MIPS_LO16	bar
 [0-9a-f]+ <[^>]*> 8f820000 	lw	v0,0\(gp\)
 [ 	]*[0-9a-f]+: R_MIPS_GOT16	bar
-[0-9a-f]+ <[^>]*> 03e00008 	jr	ra
+[0-9a-f]+ <[^>]*> 03e0000[89] 	jr	ra
 [0-9a-f]+ <[^>]*> 00000000 	nop
 	\.\.\.
diff --git a/gas/testsuite/gas/mips/option-pic-relax-0.d b/gas/testsuite/gas/mips/option-pic-relax-0.d
index 141cc5dc8ee..5e14b289c2d 100644
--- a/gas/testsuite/gas/mips/option-pic-relax-0.d
+++ b/gas/testsuite/gas/mips/option-pic-relax-0.d
@@ -16,6 +16,6 @@ Disassembly of section \.text:
 [0-9a-f]+ <[^>]*> 0399e021 	addu	gp,gp,t9
 [0-9a-f]+ <[^>]*> 8f820000 	lw	v0,0\(gp\)
 [ 	]*[0-9a-f]+: R_MIPS_GOT16	bar
-[0-9a-f]+ <[^>]*> 03e00008 	jr	ra
+[0-9a-f]+ <[^>]*> 03e0000[89] 	jr	ra
 [0-9a-f]+ <[^>]*> 00000000 	nop
 	\.\.\.
diff --git a/gas/testsuite/gas/mips/option-pic-relax-1.d b/gas/testsuite/gas/mips/option-pic-relax-1.d
index dd68fc8c96b..717a0990e2a 100644
--- a/gas/testsuite/gas/mips/option-pic-relax-1.d
+++ b/gas/testsuite/gas/mips/option-pic-relax-1.d
@@ -13,6 +13,6 @@ Disassembly of section \.text:
 [ 	]*[0-9a-f]+: R_MIPS_HI16	bar
 [0-9a-f]+ <[^>]*> 24420000 	addiu	v0,v0,0
 [ 	]*[0-9a-f]+: R_MIPS_LO16	bar
-[0-9a-f]+ <[^>]*> 03e00008 	jr	ra
+[0-9a-f]+ <[^>]*> 03e0000[89] 	jr	ra
 [0-9a-f]+ <[^>]*> 00000000 	nop
 	\.\.\.
-- 
2.39.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-22  9:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-22  9:37 [PATCH v2] MIPS/GAS: Fix test failures due to jr encoding changes on r6 YunQiang Su

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).