* [PATCH] Fix patchable-function-entry on arc
@ 2020-01-23 2:16 apinski
2020-01-23 15:29 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: apinski @ 2020-01-23 2:16 UTC (permalink / raw)
To: gcc-patches; +Cc: Andrew Pinski
From: Andrew Pinski <apinski@marvell.com>
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.
---
gcc/ChangeLog | 4 ++++
gcc/config/arc/arc.c | 2 ++
2 files changed, 6 insertions(+)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 07e7356..55b2392 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2020-01-22 Andrew Pinski <apinski@marvell.com>
+
+ * config/arc/arc.c (output_short_suffix): Check insn for nullness.
+
2020-01-22 David Malcolm <dmalcolm@redhat.com>
PR analyzer/93307
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 02ab339..22475f2 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -5537,6 +5537,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))
{
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix patchable-function-entry on arc
2020-01-23 2:16 [PATCH] Fix patchable-function-entry on arc apinski
@ 2020-01-23 15:29 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2020-01-23 15:29 UTC (permalink / raw)
To: apinski, gcc-patches
On Wed, 2020-01-22 at 17:25 -0800, apinski@marvell.com wrote:
> From: Andrew Pinski <apinski@marvell.com>
>
> 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.
I almost did this myself, but just didn't feel comfortable ;-)
jeff
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-23 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23 2:16 [PATCH] Fix patchable-function-entry on arc apinski
2020-01-23 15:29 ` Jeff Law
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).