public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/giulianob/heads/pfe_backport_dirty)] Backport Error out on nvptx for fpatchable-function-entry
@ 2021-10-11 20:33 Giuliano Belinassi
  0 siblings, 0 replies; 2+ messages in thread
From: Giuliano Belinassi @ 2021-10-11 20:33 UTC (permalink / raw)
  To: gcc-cvs

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" } */


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gcc(refs/users/giulianob/heads/pfe_backport_dirty)] Backport Error out on nvptx for fpatchable-function-entry
@ 2021-10-25 15:01 Giuliano Belinassi
  0 siblings, 0 replies; 2+ messages in thread
From: Giuliano Belinassi @ 2021-10-25 15:01 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4abd224b7fad92b0099c437cfb5c2bf4c58a7e0d

commit 4abd224b7fad92b0099c437cfb5c2bf4c58a7e0d
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/config/nvptx/nvptx.c                                  |  4 ++++
 .../gcc.target/nvptx/patchable_function_entry-default.c   | 15 +++++++++++++++
 2 files changed, 19 insertions(+)

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/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" } */


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-25 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 20:33 [gcc(refs/users/giulianob/heads/pfe_backport_dirty)] Backport Error out on nvptx for fpatchable-function-entry Giuliano Belinassi
2021-10-25 15:01 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).