[PATCH] Fix PR 93242: patchable-function-entry broken on MIPS

Jeff Law law@redhat.com
Wed Jan 22 23:10:00 GMT 2020


On Wed, 2020-01-22 at 13:16 -0800, Andrew Pinski wrote:
> On Wed, Jan 22, 2020 at 12:48 PM Jeff Law <law@redhat.com> wrote:
> > On Mon, 2020-01-20 at 09:42 +0100, Richard Biener wrote:
> > > On Sat, Jan 18, 2020 at 1:47 AM <apinski@marvell.com> wrote:
> > > > From: Andrew Pinski <apinski@marvell.com>
> > > > 
> > > > On MIPS, .set noreorder/reorder needs to emitted around
> > > > the nop.  The template for the nop instruction uses %(/%) to
> > > > do that.  But default_print_patchable_function_entry uses
> > > > fprintf rather than output_asm_insn to output the instruction.
> > > > 
> > > > This fixes the problem by using output_asm_insn to emit the nop
> > > > instruction.
> > > > 
> > > > OK?  Bootstrapped and tested on x86_64-linux-gnu and built a full
> > > > mips toolchain also.
> > > 
> > > OK.
> > FWIW, I think this may have broke the arc-elf port.  I'm getting
> > failures for the patchable function entry tests.  It looks like the
> > port wants to peek a the current_output_insn in its handling of an
> > output punctuation characters and current_output_insn is NULL.
> 
> I suspect arc-elf was failing beforehand; just not crashing the compiler :).
> Before this patch we would be printing out "nop%?" for arc-elf.  The
> tests are "compile" so they would have "passed" but only because the
> tests was not trying to assemble them.  If someone had tried to use
> this option of arc-elf, they would have ran into a similar problem as
> mips, printing out %? (in arc case).
The tester complains when something changes from pass to fail, it does
not complain for new tests that fail.

Jeff



More information about the Gcc-patches mailing list