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_dirty)] Backport Error out on nvptx for fpatchable-function-entry
Date: Mon, 11 Oct 2021 20:33:37 +0000 (GMT)	[thread overview]
Message-ID: <20211011203337.540B13857807@sourceware.org> (raw)

https://gcc.gnu.org/g:44863a5627c48145ceb31a96dae212409045f7f0

commit 44863a5627c48145ceb31a96dae212409045f7f0
Author: Tom de Vries <tom@codesourcery.com>
Date:   Thu Aug 3 11:18:09 2017 +0000

    Backport Error out on nvptx for fpatchable-function-entry
    
    2021-10-07  Giuliano Belinassi  <gbelinassi@suse.de>
    
            Backport from mainline
            2017-08-03  Tom de Vries  <tom@codesourcery.com>
    
            PR target/81662
            * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
            function_entry_patch_area_size > 0.
    
            * gcc.target/nvptx/patchable_function_entry-default.c: New test.

Diff:
---
 gcc/ChangeLog                                             |  9 +++++++++
 gcc/config/nvptx/nvptx.c                                  |  4 ++++
 gcc/testsuite/ChangeLog                                   |  8 ++++++++
 .../gcc.target/nvptx/patchable_function_entry-default.c   | 15 +++++++++++++++
 4 files changed, 36 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ed3fd9a668b..7b11f6a3d40 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2021-10-07  Giuliano Belinassi  <gbelinassi@suse.de>
+
+	Backport from mainline
+	2017-08-03  Tom de Vries  <tom@codesourcery.com>
+
+	PR target/81662
+	* config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
+	function_entry_patch_area_size > 0.
+
 2021-10-07  Giuliano Belinassi  <gbelinassi@suse.de>
 
 	Backport from mainline
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index 74bce3ec8d0..b0470836fb8 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -178,6 +178,10 @@ nvptx_option_override (void)
   if (!global_options_set.x_flag_no_common)
     flag_no_common = 1;
 
+  /* The patch area requires nops, which we don't have.  */
+  if (function_entry_patch_area_size > 0)
+    sorry ("not generating patch area, nops not supported");
+
   /* Assumes that it will see only hard registers.  */
   flag_var_tracking = 0;
 
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 186bfce3954..17fb03ea2aa 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2021-10-07  Giuliano Belinassi  <gbelinassi@suse.de>
+
+	Backport from mainline
+	2017-08-03  Tom de Vries  <tom@codesourcery.com>
+
+	PR target/81662
+	* gcc.target/nvptx/patchable_function_entry-default.c: New test.
+
 2021-10-07  Giuliano Belinassi  <gbelinassi@suse.de>
 
 	Backport from mainline
diff --git a/gcc/testsuite/gcc.target/nvptx/patchable_function_entry-default.c b/gcc/testsuite/gcc.target/nvptx/patchable_function_entry-default.c
new file mode 100644
index 00000000000..42544562725
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/patchable_function_entry-default.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
+
+extern int a;
+
+int f3 (void);
+
+int
+__attribute__((noinline))
+f3 (void)
+{
+  return 5*a;
+}
+
+/* { dg-excess-errors "sorry, unimplemented: not generating patch area, nops not supported" } */


             reply	other threads:[~2021-10-11 20:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11 20:33 Giuliano Belinassi [this message]
2021-10-25 15:01 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=20211011203337.540B13857807@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).