Fix PR 93242: patchable-function-entry broken on MIPS

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.

ChangeLog:

PR middle-end/93242
* targhooks.c (default_print_patchable_function_entry): Use
output_asm_insn to emit the nop instruction.
This commit is contained in:
Andrew Pinski 2020-01-18 00:41:06 +00:00
parent 414231ba78
commit 45d06a4045
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2020-01-20 Andrew Pinski <apinski@marvell.com>
PR middle-end/93242
* targhooks.c (default_print_patchable_function_entry): Use
output_asm_insn to emit the nop instruction.
2020-01-20 Fangrui Song <maskray@google.com>
PR middle-end/93194

View File

@ -1823,7 +1823,7 @@ default_print_patchable_function_entry (FILE *file,
unsigned i;
for (i = 0; i < patch_area_size; ++i)
fprintf (file, "\t%s\n", nop_templ);
output_asm_insn (nop_templ, NULL);
}
bool