On Tue, 17 Aug 2021, Ralf Baechle 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.
Yes, I made such a change when I discovered the mess around coprocessor instructions in binutils earlier this year. Eighteen patches total to straighten it out. Some instructions were misassembled even, and no proper subsetting was made, so you could come with a nonsensical mixture when disassembling. And RFE was disassembled as `c0 0x10' regardless of the ISA chosen.
It should be fixable by simply putting gas into mips1 mode. Can you test below patch?
But it's missing the point, as I noted in the other message. I've been too busy with higher priority stuff to get to a proper fix right away (I thought I was the last one using the DECstation, and especially with the top of the tree binutils).
Maciej