public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Giuliano Belinassi <giulianob@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/giulianob/heads/pfe_backport_clean)] Backport Fix patchable-function-entry on arc
Date: Thu, 21 Oct 2021 14:49:04 +0000 (GMT)	[thread overview]
Message-ID: <20211021144904.C37483857C75@sourceware.org> (raw)

https://gcc.gnu.org/g:1b5eac0b3d586f3b51baff5667d903de4a4e06a6

commit 1b5eac0b3d586f3b51baff5667d903de4a4e06a6
Author: Andrew Pinski <apinski@marvell.com>
Date:   Wed Jan 22 23:34:34 2020 +0000

    Backport 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.
    
    gcc/ChangeLog
    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.

Diff:
---
 gcc/config/arc/arc.c | 2 ++
 1 file changed, 2 insertions(+)

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))
     {


             reply	other threads:[~2021-10-21 14:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 14:49 Giuliano Belinassi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-10-19 18:40 Giuliano Belinassi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211021144904.C37483857C75@sourceware.org \
    --to=giulianob@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).