public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] MIPS: Set r6 as default arch if vendor is img
Date: Thu, 30 Nov 2023 15:57:19 +0000 (GMT)	[thread overview]
Message-ID: <20231130155719.2642E385E008@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=070961b377b3762c41903253bfacdedd65171ab7

commit 070961b377b3762c41903253bfacdedd65171ab7
Author: YunQiang Su <yunqiang.su@cipunited.com>
Date:   Fri Nov 24 17:39:55 2023 +0800

    MIPS: Set r6 as default arch if vendor is img
    
    This behavior is used by downstream toolchain since 2014,
    and has been in GCC since the same year.
    
    We don't support mips64*-img* due to GCC doesn't support it,
    and we believe that the multilib should be used for this case.

Diff:
---
 bfd/config.bfd                              | 2 +-
 gas/configure                               | 6 ++++++
 gas/configure.ac                            | 6 ++++++
 gas/testsuite/gas/mips/mips.exp             | 2 +-
 gas/testsuite/gas/mips/module-defer-warn2.d | 2 +-
 5 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/bfd/config.bfd b/bfd/config.bfd
index 08129e6a8cb..8c9637ae2b0 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -1550,7 +1550,7 @@ case "${targ_defvec} ${targ_selvecs}" in
 esac
 
 case "${targ}" in
-  mipsisa32r6* | mipsisa64r6*)
+  mipsisa32r6* | mipsisa64r6* | mips*-img-*)
     targ_cflags="$targ_cflags -DMIPS_DEFAULT_R6=1"
     ;;
 esac
diff --git a/gas/configure b/gas/configure
index 6a2f56f928a..ace1a17365f 100755
--- a/gas/configure
+++ b/gas/configure
@@ -12264,6 +12264,12 @@ _ACEOF
 	    use_ef_mips_abi_o32=1
 	    ;;
 	esac
+	# If Vendor is IMG, then MIPSr6 is used
+	case ${target} in
+	  mips*-img-*)
+	    mips_cpu=mips32r6
+	    ;;
+	esac
 	# Decide whether to generate 32-bit or 64-bit code by default.
 	# Used to resolve -march=from-abi when an embedded ABI is selected.
 	case ${target} in
diff --git a/gas/configure.ac b/gas/configure.ac
index d0b4cfb0310..7dac22144d9 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
@@ -382,6 +382,12 @@ changequote([,])dnl
 	    use_ef_mips_abi_o32=1
 	    ;;
 	esac
+	# If Vendor is IMG, then MIPSr6 is used
+	case ${target} in
+	  mips*-img-*)
+	    mips_cpu=mips32r6
+	    ;;
+	esac
 	# Decide whether to generate 32-bit or 64-bit code by default.
 	# Used to resolve -march=from-abi when an embedded ABI is selected.
 	case ${target} in
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 777ae6536f0..9238b26800d 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -473,7 +473,7 @@ mips_arch_create mips32r5 32	mips32r3 { fpisa3 fpisa4 fpisa5 ror } \
 mips_arch_create mips32r6 32	mips32r5 { fpisa3 fpisa4 fpisa5 ror } \
 			{ -march=mips32r6 -mtune=mips32r6 --defsym r6=} \
 			{ -mmips:isa32r6 } \
-			{ mipsisa32r6-*-* mipsisa32r6el-*-* }
+			{ mipsisa32r6-*-* mipsisa32r6el-*-* mips*-img-* }
 mips_arch_create mips64	64	mips5	{ mips32 } \
 			{ -march=mips64 -mtune=mips64 } { -mmips:isa64 } \
 			{ mipsisa64-*-* mipsisa64el-*-* }
diff --git a/gas/testsuite/gas/mips/module-defer-warn2.d b/gas/testsuite/gas/mips/module-defer-warn2.d
index 5c2d1d7fa8e..1ff4fefecf7 100644
--- a/gas/testsuite/gas/mips/module-defer-warn2.d
+++ b/gas/testsuite/gas/mips/module-defer-warn2.d
@@ -1,5 +1,5 @@
 #name: .module deferred warnings 2 (pre-R2)
 #source: module-defer-warn2.s
 #as: -32
-#skip: mipsisa32r?* mipsisa64r?*
+#skip: mipsisa32r?* mipsisa64r?* mips*-img-*
 #error_output: module-defer-warn2.l

                 reply	other threads:[~2023-11-30 15:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231130155719.2642E385E008@sourceware.org \
    --to=nickc@sourceware.org \
    --cc=bfd-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).