On Wed, Jan 22, 2020 at 1:16 PM Andrew Pinski <pins...@gmail.com> wrote:
>
> On Wed, Jan 22, 2020 at 12:48 PM Jeff Law <l...@redhat.com> wrote:
> >
> > On Mon, 2020-01-20 at 09:42 +0100, Richard Biener wrote:
> > > On Sat, Jan 18, 2020 at 1:47 AM <apin...@marvell.com> wrote:
> > > > From: Andrew Pinski <apin...@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).

Just a quick survey of the targets which had an issue before this patch:
* arc - uses %?
* bpf - uses %%
* mips - uses %(/%) which emits .set noreorder/reorder
* nios2 - %.
* s390 - %%

nios2 - checks current_output_insn for null-ness when it is seeing if
it needs to print . or not.
arc - does not check current_output_insn for null-ness

Thanks,
Andrew Pinski


>
> Thanks,
> Andrew Pinski
>
>
> >
> > jeff
> > >
> >

Reply via email to