Hi Ralf,
On Tue, Aug 17, 2021 at 1:55 PM Ralf Baechle ralf@linux-mips.org wrote:
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:
<snip>
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?
Tested on top of v5.4.142-rc2 and it builds again. Thanks for the quick reply and the patch.