public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/gccgo] Fix PR 93242: patchable-function-entry broken on MIPS
@ 2020-01-23  0:32 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2020-01-23  0:32 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:45d06a4045bebc3dbaaf0b1c676f4e22b7c6aca1

commit 45d06a4045bebc3dbaaf0b1c676f4e22b7c6aca1
Author: Andrew Pinski <apinski@marvell.com>
Date:   Sat Jan 18 00:41:06 2020 +0000

    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.

Diff:
---
 gcc/ChangeLog   | 6 ++++++
 gcc/targhooks.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 436c892..8db7c81 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index a3f8391..7cb04f3 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-23  0:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23  0:32 [gcc/devel/gccgo] Fix PR 93242: patchable-function-entry broken on MIPS Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).