From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 811DB3858D28 for ; Wed, 15 Dec 2021 14:01:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 811DB3858D28 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5F54D1F387 for ; Wed, 15 Dec 2021 14:01:47 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3E8BD13B45 for ; Wed, 15 Dec 2021 14:01:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2PsMDkv1uWFyXAAAMHmgww (envelope-from ) for ; Wed, 15 Dec 2021 14:01:47 +0000 Date: Wed, 15 Dec 2021 15:01:45 +0100 From: Tom de Vries To: gcc-patches@gcc.gnu.org Subject: [committed][nvptx] Add -mptx=7.0 Message-ID: <20211215140143.GA10043@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2021 14:01:53 -0000 Hi, Add support for ptx isa version 7.0, required for the addition of -misa=sm_75 and -misa=sm_80. Tested by setting the default ptx isa version to 7.0, and doing a build and libgomp test run. Committed to trunk. Thanks, - Tom [nvptx] Add -mptx=7.0 gcc/ChangeLog: * config/nvptx/nvptx-opts.h (enum ptx_version): Add PTX_VERSION_7_0. * config/nvptx/nvptx.c (nvptx_file_start): Handle TARGET_PTX_7_0. * config/nvptx/nvptx.h (TARGET_PTX_7_0): New macro. * config/nvptx/nvptx.opt (ptx_version): Add 7.0. --- gcc/config/nvptx/nvptx-opts.h | 3 ++- gcc/config/nvptx/nvptx.c | 4 +++- gcc/config/nvptx/nvptx.h | 1 + gcc/config/nvptx/nvptx.opt | 3 +++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/config/nvptx/nvptx-opts.h b/gcc/config/nvptx/nvptx-opts.h index f7371dc274c..396fe871163 100644 --- a/gcc/config/nvptx/nvptx-opts.h +++ b/gcc/config/nvptx/nvptx-opts.h @@ -30,7 +30,8 @@ enum ptx_isa enum ptx_version { PTX_VERSION_3_1, - PTX_VERSION_6_3 + PTX_VERSION_6_3, + PTX_VERSION_7_0 }; #endif diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 445d7ce8cc9..51eef2b45b2 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -5404,7 +5404,9 @@ static void nvptx_file_start (void) { fputs ("// BEGIN PREAMBLE\n", asm_out_file); - if (TARGET_PTX_6_3) + if (TARGET_PTX_7_0) + fputs ("\t.version\t7.0\n", asm_out_file); + else if (TARGET_PTX_6_3) fputs ("\t.version\t6.3\n", asm_out_file); else fputs ("\t.version\t3.1\n", asm_out_file); diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index c3480cc1c26..92fd9d3b6d1 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -90,6 +90,7 @@ #define TARGET_SM53 (ptx_isa_option >= PTX_ISA_SM53) #define TARGET_PTX_6_3 (ptx_version_option >= PTX_VERSION_6_3) +#define TARGET_PTX_7_0 (ptx_version_option >= PTX_VERSION_7_0) /* Registers. Since ptx is a virtual target, we just define a few hard registers for special purposes and leave pseudos unallocated. diff --git a/gcc/config/nvptx/nvptx.opt b/gcc/config/nvptx/nvptx.opt index 514f19d171e..04b45da9249 100644 --- a/gcc/config/nvptx/nvptx.opt +++ b/gcc/config/nvptx/nvptx.opt @@ -79,6 +79,9 @@ Enum(ptx_version) String(3.1) Value(PTX_VERSION_3_1) EnumValue Enum(ptx_version) String(6.3) Value(PTX_VERSION_6_3) +EnumValue +Enum(ptx_version) String(7.0) Value(PTX_VERSION_7_0) + mptx= Target RejectNegative ToLower Joined Enum(ptx_version) Var(ptx_version_option) Init(PTX_VERSION_3_1) Specify the version of the ptx version to use.