public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/giulianob/heads/pfe_backport)] Fix patchable-function-entry on arc
@ 2021-10-11 20:50 Giuliano Belinassi
0 siblings, 0 replies; only message in thread
From: Giuliano Belinassi @ 2021-10-11 20:50 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:69320cb273640a3610b0a0c60ad970f7d270cfc9
commit 69320cb273640a3610b0a0c60ad970f7d270cfc9
Author: Andrew Pinski <apinski@marvell.com>
Date: Wed Jan 22 23:34:34 2020 +0000
Fix patchable-function-entry on arc
The problem here is arc looks at current_output_insn unconditional
but sometimes current_output_insn is NULL. With patchable-function-entry,
it will be. This is similar to how the nios2, handles "%.".
Committed as obvious after a simple test with -fpatchable-function-entry=1.
ChangeLog:
* config/arc/arc.c (output_short_suffix): Check insn for nullness.
Diff:
---
gcc/ChangeLog | 7 +++++++
gcc/config/arc/arc.c | 2 ++
2 files changed, 9 insertions(+)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0df1da72b48..861506e632a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
+
+ Backport from mainline
+ 2020-01-22 Andrew Pinski <apinski@marvell.com>
+
+ * config/arc/arc.c (output_short_suffix): Check insn for nullness.
+
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 92fecad93d9..5e92983929d 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -4195,6 +4195,8 @@ static void
output_short_suffix (FILE *file)
{
rtx_insn *insn = current_output_insn;
+ if (!insn)
+ return;
if (arc_verify_short (insn, cfun->machine->unalign, 1))
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-11 20:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 20:50 [gcc(refs/users/giulianob/heads/pfe_backport)] Fix patchable-function-entry on arc Giuliano Belinassi
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).