From: Thomas Schwinge <thomas@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>
Cc: Richard Biener <rguenther@suse.de>,
Tom de Vries <Tom_deVries@mentor.com>,
Cesar Philippidis <cesar@codesourcery.com>
Subject: Re: [PATCH,PTX] Add support for CUDA 9
Date: Fri, 02 Mar 2018 08:45:00 -0000 [thread overview]
Message-ID: <877equg91r.fsf@hertz.schwinge.homeip.net> (raw)
In-Reply-To: <alpine.LSU.2.20.1802271512420.18265@zhemvz.fhfr.qr>
Hi!
On Tue, 27 Feb 2018 15:12:47 +0100, Richard Biener <rguenther@suse.de> wrote:
> On Tue, 27 Feb 2018, Thomas Schwinge wrote:
> > Given that several users have run into this, is this (trunk r256891) OK
> > to commit to open release branches, too.
>
> Sure.
Committed to gcc-7-branch in r258126:
commit f0888f115525785d8876d1718fcb0580996e2f30
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri Mar 2 08:39:31 2018 +0000
[nvptx] Add support for CUDA 9
Backport trunk r256891:
gcc/
2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
PR target/83790
* config/nvptx/nvptx.c (output_init_frag): Don't use generic address
spaces for function labels.
gcc/testsuite/
2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
PR target/83790
* gcc.target/nvptx/indirect_call.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@258126 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/ChangeLog | 9 +++++++++
gcc/config/nvptx/nvptx.c | 10 ++++++++--
gcc/testsuite/ChangeLog | 8 ++++++++
gcc/testsuite/gcc.target/nvptx/indirect_call.c | 19 +++++++++++++++++++
4 files changed, 44 insertions(+), 2 deletions(-)
diff --git gcc/ChangeLog gcc/ChangeLog
index def6171..5390d49 100644
--- gcc/ChangeLog
+++ gcc/ChangeLog
@@ -1,3 +1,12 @@
+2017-03-02 Thomas Schwinge <thomas@codesourcery.com>
+
+ Backport from trunk r256891:
+ 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
+
+ PR target/83790
+ * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
+ spaces for function labels.
+
2018-02-26 Carl Love <cel@us.ibm.com>
Backport from mainline: commit 257747 on 2018-02-16.
diff --git gcc/config/nvptx/nvptx.c gcc/config/nvptx/nvptx.c
index e89b314..70a8f0d 100644
--- gcc/config/nvptx/nvptx.c
+++ gcc/config/nvptx/nvptx.c
@@ -1875,9 +1875,15 @@ output_init_frag (rtx sym)
if (sym)
{
- fprintf (asm_out_file, "generic(");
+ bool function = (SYMBOL_REF_DECL (sym)
+ && (TREE_CODE (SYMBOL_REF_DECL (sym)) == FUNCTION_DECL));
+ if (!function)
+ fprintf (asm_out_file, "generic(");
output_address (VOIDmode, sym);
- fprintf (asm_out_file, val ? ") + " : ")");
+ if (!function)
+ fprintf (asm_out_file, ")");
+ if (val)
+ fprintf (asm_out_file, " + ");
}
if (!sym || val)
diff --git gcc/testsuite/ChangeLog gcc/testsuite/ChangeLog
index 359cbac..2d94cd1 100644
--- gcc/testsuite/ChangeLog
+++ gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2017-03-02 Thomas Schwinge <thomas@codesourcery.com>
+
+ Backport from trunk r256891:
+ 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
+
+ PR target/83790
+ * gcc.target/nvptx/indirect_call.c: New test.
+
2017-03-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
diff --git gcc/testsuite/gcc.target/nvptx/indirect_call.c gcc/testsuite/gcc.target/nvptx/indirect_call.c
new file mode 100644
index 0000000..39992a7
--- /dev/null
+++ gcc/testsuite/gcc.target/nvptx/indirect_call.c
@@ -0,0 +1,19 @@
+/* { dg-options "-O2 -msoft-stack" } */
+/* { dg-do run } */
+
+int
+f1 (int a)
+{
+ return a + 1;
+}
+
+int (*f2)(int) = f1;
+
+int
+main ()
+{
+ if (f2 (100) != 101)
+ __builtin_abort();
+
+ return 0;
+}
Committed to gcc-6-branch in r258127:
commit 5eec276cf6e2721ba60e187edeb00af5f6b7565f
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri Mar 2 08:40:04 2018 +0000
[nvptx] Add support for CUDA 9
Backport trunk r256891:
gcc/
2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
PR target/83790
* config/nvptx/nvptx.c (output_init_frag): Don't use generic address
spaces for function labels.
gcc/testsuite/
2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
PR target/83790
* gcc.target/nvptx/indirect_call.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@258127 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/ChangeLog | 9 +++++++++
gcc/config/nvptx/nvptx.c | 10 ++++++++--
gcc/testsuite/ChangeLog | 8 ++++++++
gcc/testsuite/gcc.target/nvptx/indirect_call.c | 19 +++++++++++++++++++
4 files changed, 44 insertions(+), 2 deletions(-)
diff --git gcc/ChangeLog gcc/ChangeLog
index cebcf85..23296f2 100644
--- gcc/ChangeLog
+++ gcc/ChangeLog
@@ -1,3 +1,12 @@
+2017-03-02 Thomas Schwinge <thomas@codesourcery.com>
+
+ Backport from trunk r256891:
+ 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
+
+ PR target/83790
+ * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
+ spaces for function labels.
+
2018-02-21 Sudakshina Das <sudi.das@arm.com>
Backport from trunk
diff --git gcc/config/nvptx/nvptx.c gcc/config/nvptx/nvptx.c
index 2262005..16e80421 100644
--- gcc/config/nvptx/nvptx.c
+++ gcc/config/nvptx/nvptx.c
@@ -1483,9 +1483,15 @@ output_init_frag (rtx sym)
if (sym)
{
- fprintf (asm_out_file, "generic(");
+ bool function = (SYMBOL_REF_DECL (sym)
+ && (TREE_CODE (SYMBOL_REF_DECL (sym)) == FUNCTION_DECL));
+ if (!function)
+ fprintf (asm_out_file, "generic(");
output_address (VOIDmode, sym);
- fprintf (asm_out_file, val ? ") + " : ")");
+ if (!function)
+ fprintf (asm_out_file, ")");
+ if (val)
+ fprintf (asm_out_file, " + ");
}
if (!sym || val)
diff --git gcc/testsuite/ChangeLog gcc/testsuite/ChangeLog
index b1abb94..e2c0b7a 100644
--- gcc/testsuite/ChangeLog
+++ gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2017-03-02 Thomas Schwinge <thomas@codesourcery.com>
+
+ Backport from trunk r256891:
+ 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
+
+ PR target/83790
+ * gcc.target/nvptx/indirect_call.c: New test.
+
2018-02-28 Alan Modra <amodra@gmail.com>
* lib/prune.exp (prune_gcc_output): Match lower case "in function"
diff --git gcc/testsuite/gcc.target/nvptx/indirect_call.c gcc/testsuite/gcc.target/nvptx/indirect_call.c
new file mode 100644
index 0000000..5ac939e
--- /dev/null
+++ gcc/testsuite/gcc.target/nvptx/indirect_call.c
@@ -0,0 +1,19 @@
+/* { dg-options "-O2" } */
+/* { dg-do run } */
+
+int
+f1 (int a)
+{
+ return a + 1;
+}
+
+int (*f2)(int) = f1;
+
+int
+main ()
+{
+ if (f2 (100) != 101)
+ __builtin_abort();
+
+ return 0;
+}
Grüße
Thomas
prev parent reply other threads:[~2018-03-02 8:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-19 23:25 Cesar Philippidis
2017-12-20 0:40 ` Tom de Vries
2017-12-20 22:59 ` Cesar Philippidis
2017-12-20 23:15 ` Tom de Vries
2017-12-21 17:19 ` Cesar Philippidis
2017-12-27 9:16 ` Tom de Vries
2018-01-17 17:31 ` Cesar Philippidis
2018-01-17 23:23 ` Tom de Vries
2018-01-19 4:27 ` Cesar Philippidis
2018-01-19 8:46 ` Tom de Vries
2018-02-27 14:08 ` Thomas Schwinge
2018-02-27 14:12 ` Richard Biener
2018-03-02 8:45 ` Thomas Schwinge [this message]
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=877equg91r.fsf@hertz.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=Tom_deVries@mentor.com \
--cc=cesar@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/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).