From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25302 invoked by alias); 3 Aug 2017 11:23:30 -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 25259 invoked by uid 89); 3 Aug 2017 11:23:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Aug 2017 11:23:25 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ddEDq-00035N-OK from Tom_deVries@mentor.com for gcc-patches@gcc.gnu.org; Thu, 03 Aug 2017 04:23:22 -0700 Received: from [127.0.0.1] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 3 Aug 2017 12:23:19 +0100 Subject: [nvptx, PR 81662, committed] Error out on nvptx for fpatchable-function-entry From: Tom de Vries To: GCC Patches References: <9b7cba92-382d-4255-9983-2868726ad4f5@mentor.com> Message-ID: <6ad5514b-cb0c-98f0-50ed-bacfa19a39a3@mentor.com> Date: Thu, 03 Aug 2017 11:23:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <9b7cba92-382d-4255-9983-2868726ad4f5@mentor.com> Content-Type: multipart/mixed; boundary="------------01E14119B1CFBE58C63B141D" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-SW-Source: 2017-08/txt/msg00282.txt.bz2 --------------01E14119B1CFBE58C63B141D Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 359 [ was: Re: [testsuite, PR81662, committed] Skip fpatchable-function-entry tests for nvptx ] On 08/03/2017 09:17 AM, Tom de Vries wrote: > Hi, > > fpatchable-function-entry requires nop, which nvptx does not have. > > I've disabled the corresponding test for nvptx. This patch errors out on nvptx for fpatchable-function-entry. Committed. Thanks, - Tom --------------01E14119B1CFBE58C63B141D Content-Type: text/x-patch; name="0001-Error-out-on-nvptx-for-fpatchable-function-entry.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0001-Error-out-on-nvptx-for-fpatchable-function-entry.patch" Content-length: 1584 Error out on nvptx for fpatchable-function-entry 2017-08-03 Tom de Vries 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. --- 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 208b115..9211d1a 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -180,6 +180,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 0000000..4254456 --- /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" } */ --------------01E14119B1CFBE58C63B141D--