From: Ralf Baechle <ralf@linux-mips.org>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>,
Paul Burton <paulburton@kernel.org>,
James Hogan <jhogan@kernel.org>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: build failure of mips decstation_r4k_defconfig with binutils-2_37
Date: Tue, 17 Aug 2021 14:55:09 +0200 [thread overview]
Message-ID: <YRuxrfYxahPbHmXl@linux-mips.org> (raw)
In-Reply-To: <YRujeISiIjKF5eAi@debian>
On Tue, Aug 17, 2021 at 12:54:32PM +0100, Sudip Mukherjee wrote:
> While I was testing v5.4.142-rc2 I noticed mips build of
> decstation_r4k_defconfig fails with binutils-2_37. The error is:
>
> arch/mips/dec/prom/locore.S: Assembler messages:
> arch/mips/dec/prom/locore.S:29: Error: opcode not supported on this
> processor: r4600 (mips3) `rfe'
>
> I have also reported this at https://sourceware.org/bugzilla/show_bug.cgi?id=28241
It would appear gas got more anal about ISA checking for the RFE instructions
which did only exist in MIPS I and II; MIPS III and later use ERET for
returning from an exception.
The older gas I've got installed here happily accepts RFE in MIPS III/R4000
mode:
$ cat s.s
rfe
eret
$ mips-linux-as -o s.o s.s
s.s: Assembler messages:
s.s:2: Error: opcode not supported on this processor: mips1 (mips1) `eret'
$ mips-linux-as -march=r4000 -o s.o s.s
$ mips-linux-objdump -d s.o
s.o: file format elf32-tradbigmips
Disassembly of section .text:
00000000 <.text>:
0: 42000010 c0 0x10 # <- RFE
4: 42000018 eret
...
$
It's easy to find arguments for why this gas change is the right thing to
do - and not the right thing to do.
It should be fixable by simply putting gas into mips1 mode. Can you test
below patch?
Ralf
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
diff --git a/arch/mips/dec/prom/locore.S b/arch/mips/dec/prom/locore.S
index 0eb8fab62ab0..8d00ca8872f9 100644
--- a/arch/mips/dec/prom/locore.S
+++ b/arch/mips/dec/prom/locore.S
@@ -16,6 +16,7 @@
NESTED(genexcept_early, 0, sp)
.set noat
.set noreorder
+ .set mips1
mfc0 k0, CP0_STATUS
la k1, mem_err
next prev parent reply other threads:[~2021-08-17 12:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 11:54 build failure of mips decstation_r4k_defconfig with binutils-2_37 Sudip Mukherjee
2021-08-17 12:55 ` Ralf Baechle [this message]
2021-08-17 13:33 ` Sudip Mukherjee
2021-08-17 13:47 ` Maciej W. Rozycki
2021-08-17 13:36 ` Maciej W. Rozycki
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=YRuxrfYxahPbHmXl@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=jhogan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=paulburton@kernel.org \
--cc=stable@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.