From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21775 invoked by alias); 27 Feb 2018 14:12:51 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 21759 invoked by uid 89); 27 Feb 2018 14:12:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,KAM_STOCKGEN,SPF_PASS,T_RP_MATCHES_RCVD,URIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:2484, H*c:HHHHH X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Feb 2018 14:12:49 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 40A32ACDB; Tue, 27 Feb 2018 14:12:47 +0000 (UTC) Date: Tue, 27 Feb 2018 14:12:00 -0000 From: Richard Biener To: Thomas Schwinge cc: gcc-patches@gcc.gnu.org, Tom de Vries , Cesar Philippidis Subject: Re: [PATCH,PTX] Add support for CUDA 9 In-Reply-To: <87sh9mjzjb.fsf@euler.schwinge.homeip.net> Message-ID: References: <002bf03f-baad-5809-6e9a-2fdffa0c1e2c@codesourcery.com> <6fd03d69-e18f-fb3d-f7c3-f833c8ba5ff7@codesourcery.com> <87sh9mjzjb.fsf@euler.schwinge.homeip.net> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="-1609908220-1343992003-1519740767=:18265" X-SW-Source: 2018-02/txt/msg01499.txt.bz2 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1609908220-1343992003-1519740767=:18265 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-length: 2546 On Tue, 27 Feb 2018, Thomas Schwinge wrote: > Hi! > > Given that several users have run into this, is this (trunk r256891) OK > to commit to open release branches, too. Sure. > On Fri, 19 Jan 2018 09:42:08 +0100, Tom de Vries wrote: > > On 01/19/2018 01:59 AM, Cesar Philippidis wrote: > > > Here's the updated patch with the changes that you requested. There are > > > no new regressions in trunk. I tested it on my desktop running driver > > > 387.34 on a Pascal GPU. > > > > > > Is this OK for trunk? > > > > OK with 'PR target/83790' added to the changelog entry. > > > > Thanks, > > - Tom > > > > > > > > trunk-cuda9.diff > > > > > > > > > 2018-01-18 Cesar Philippidis > > > > > > gcc/ > > > * config/nvptx/nvptx.c (output_init_frag): Don't use generic address > > > spaces for function labels. > > > > > > gcc/testsuite/ > > > * gcc.target/nvptx/indirect_call.c: New test. > > > > > > diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c > > > index 86fc13f4fc0..4cb87c8ad07 100644 > > > --- a/gcc/config/nvptx/nvptx.c > > > +++ b/gcc/config/nvptx/nvptx.c > > > @@ -1899,9 +1899,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 a/gcc/testsuite/gcc.target/nvptx/indirect_call.c b/gcc/testsuite/gcc.target/nvptx/indirect_call.c > > > new file mode 100644 > > > index 00000000000..39992a7137b > > > --- /dev/null > > > +++ b/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; > > > +} > > > Grüße > Thomas > > -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg) ---1609908220-1343992003-1519740767=:18265--