[PATCH] GAS/MIPS: add "--defsym r6=" for default when it's r6

YunQiang Su yunqiang.su@cipunited.com
Tue Nov 14 06:22:01 GMT 2023


In mips.exp, `mips_arch_create` is used to create an test arch,
and it will try to create a `default` arch.
When our gas is configured as mips32r6/mips64r6, the '--defsym r6='
option is missing when create `default`.
Let's add it back.
---
 gas/testsuite/gas/mips/mips.exp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 86753e57b79..0611273cac6 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -161,6 +161,12 @@ proc mips_arch_create {arch gprsize extends props as_flags objdump_flags
 
 	    set archdata(displayname) "default = $arch"
     	    set archdata(as_flags) ""
+	    if { [string compare $arch mips32r6] == 0
+		 ||  [string compare $arch mips64r6] == 0} {
+		set archdata(as_flags) "--defsym r6="
+	    } else {
+		set archdata(as_flags) ""
+	    }
 	    set archdata(objdump_flags) ""
 
 	    set mips_arches(default) [array get archdata]
-- 
2.39.2



More information about the Binutils mailing list