From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7863) id B3A8F3858401; Mon, 5 Jun 2023 03:01:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B3A8F3858401 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: YunQiang Su To: bfd-cvs@sourceware.org Subject: [binutils-gdb] MIPS: default r6 if vendor is img X-Act-Checkin: binutils-gdb X-Git-Author: YunQiang Su X-Git-Refname: refs/heads/master X-Git-Oldrev: 094025a30bb2da19df3990e0c0ff8167af823aa1 X-Git-Newrev: be0d391f22fe6009c3be907753975a984cbbcc23 Message-Id: <20230605030156.B3A8F3858401@sourceware.org> Date: Mon, 5 Jun 2023 03:01:56 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2023 03:01:56 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dbe0d391f22fe= 6009c3be907753975a984cbbcc23 commit be0d391f22fe6009c3be907753975a984cbbcc23 Author: YunQiang Su Date: Wed May 10 18:07:23 2023 +0800 MIPS: default r6 if vendor is img =20 This behavior is used by downstream toolchain since 2014. We also set the default ABI for mips*-img-elf to O32. The previous value is NO_ABI, which is not good default ABI. =20 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 | 8 +++++++- gas/configure.ac | 8 +++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/bfd/config.bfd b/bfd/config.bfd index 954837033c8..78752994456 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -1537,7 +1537,7 @@ case "${targ_defvec} ${targ_selvecs}" in esac =20 case "${targ}" in - mipsisa32r6* | mipsisa64r6*) + mipsisa32r6* | mipsisa64r6* | mips*-img-*) targ_cflags=3D"$targ_cflags -DMIPS_DEFAULT_R6=3D1" ;; esac diff --git a/gas/configure b/gas/configure index 868f4a911a9..580022d858d 100755 --- a/gas/configure +++ b/gas/configure @@ -12211,6 +12211,12 @@ _ACEOF use_e_mips_abi_o32=3D1 ;; esac + # If Vendor is IMG, then MIPSr6 is used + case ${target} in + mips*-img-*) + mips_cpu=3Dmips32r6 + ;; + esac # Decide whether to generate 32-bit or 64-bit code by default. # Used to resolve -march=3Dfrom-abi when an embedded ABI is selected. case ${target} in @@ -12230,7 +12236,7 @@ _ACEOF | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*) mips_default_abi=3DN32_ABI ;; - mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu) + mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu | mips*-img-elf) mips_default_abi=3DO32_ABI ;; mips64*-openbsd*) diff --git a/gas/configure.ac b/gas/configure.ac index 03728ffce4d..c1571a49fbb 100644 --- a/gas/configure.ac +++ b/gas/configure.ac @@ -380,6 +380,12 @@ changequote([,])dnl use_e_mips_abi_o32=3D1 ;; esac + # If Vendor is IMG, then MIPSr6 is used + case ${target} in + mips*-img-*) + mips_cpu=3Dmips32r6 + ;; + esac # Decide whether to generate 32-bit or 64-bit code by default. # Used to resolve -march=3Dfrom-abi when an embedded ABI is selected. case ${target} in @@ -399,7 +405,7 @@ changequote([,])dnl | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*) mips_default_abi=3DN32_ABI ;; - mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu) + mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu | mips*-img-elf) mips_default_abi=3DO32_ABI ;; mips64*-openbsd*)