From patchwork Mon Feb 2 15:32:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 435565 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6DA0F140276 for ; Tue, 3 Feb 2015 02:33:44 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=Oxj/C/rR/Bk4cLy3 mwrCtfOQ/+5ekRl8KwzgJ+lW5Ar378UF8anMi+GfN8kP1ulPrJjt5J61N7C30rsT ggChy9fqGjv6GRseyr9MTo0pa8t1TTuErgbFurPG3XRZZj5B1WJZd9FFH3S9zF5e qye2acVChBCUQ3pt391x6Fq01qc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=eBSC4k1h5o/MmWkbpOmTVu YXOdo=; b=Wk5M7RE/weWLRWLstkGvOilRKn3xMiTYIrlJ509NEGgqCLmWagRs/3 syRWRkctNRtLg8XiXWcd7qyQC8tyayV8b+a4FlW404k171cOtXrH6Jd2/yJ04/5P 9QPr1rU38XY7keVN1hUIChffliEzIN99ryYUCP0n+3qIi+sIN3i94= Received: (qmail 24822 invoked by alias); 2 Feb 2015 15:33:11 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 24813 invoked by uid 89); 2 Feb 2015 15:33:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 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; Mon, 02 Feb 2015 15:33:08 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1YIIzo-0004Uk-6e from Thomas_Schwinge@mentor.com ; Mon, 02 Feb 2015 07:33:04 -0800 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.3.224.2; Mon, 2 Feb 2015 15:33:02 +0000 From: Thomas Schwinge To: GCC Patches , Jakub Jelinek CC: Bernd Schmidt Subject: Re: nvptx-tools and nvptx-newlib (was: The nvptx port [10/11+] Target files) In-Reply-To: <87vbl2w69s.fsf@kepler.schwinge.homeip.net> References: <54451994.9070209@codesourcery.com> <54451D57.5050803@codesourcery.com> <5447F0E1.7080906@redhat.com> <544FAE8B.5010906@codesourcery.com> <545179C6.4030406@redhat.com> <5460E5AD.6060502@codesourcery.com> <87vbl2w69s.fsf@kepler.schwinge.homeip.net> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Mon, 2 Feb 2015 16:32:34 +0100 Message-ID: <87egq8mir1.fsf@schwinge.name> MIME-Version: 1.0 Hi! On Tue, 23 Dec 2014 19:49:35 +0100, I wrote: > On Mon, 10 Nov 2014 17:19:57 +0100, Bernd Schmidt wrote: > > The scripts (11/11) I've put up on github, along with a hacked up > > newlib. These are at [...] > > They are likely to migrate to MentorEmbedded from bernds, but that had > > some permissions problems last week. > > That has recently been done: > and > are now available. > > (I'm aware that we still are to write up how to actually build and test > all this.) I just updated . OK to check in the following to trunk? commit a0c73cb76d1f13642df7725d64bc618ee0909abc Author: Thomas Schwinge Date: Mon Feb 2 16:29:36 2015 +0100 Begin documenting the nvptx backend. gcc/ * doc/install.texi (nvptx-*-none): New section. * doc/invoke.texi (Nvidia PTX Options): Likewise. * config/nvptx/nvptx.opt: Update. --- gcc/config/nvptx/nvptx.opt | 10 +++++----- gcc/doc/install.texi | 23 +++++++++++++++++++++++ gcc/doc/invoke.texi | 26 ++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 5 deletions(-) Grüße, Thomas diff --git gcc/config/nvptx/nvptx.opt gcc/config/nvptx/nvptx.opt index 1448dfc..249a61d 100644 --- gcc/config/nvptx/nvptx.opt +++ gcc/config/nvptx/nvptx.opt @@ -17,13 +17,13 @@ ; along with GCC; see the file COPYING3. If not see ; . -m64 -Target Report RejectNegative Mask(ABI64) -Generate code for a 64 bit ABI - m32 Target Report RejectNegative InverseMask(ABI64) -Generate code for a 32 bit ABI +Generate code for a 32-bit ABI + +m64 +Target Report RejectNegative Mask(ABI64) +Generate code for a 64-bit ABI mmainkernel Target Report RejectNegative diff --git gcc/doc/install.texi gcc/doc/install.texi index c9e3bf1..b31f9b6 100644 --- gcc/doc/install.texi +++ gcc/doc/install.texi @@ -3302,6 +3302,8 @@ information have to. @item @uref{#nds32be-x-elf,,nds32be-*-elf} @item +@uref{#nvptx-x-none,,nvptx-*-none} +@item @uref{#powerpc-x-x,,powerpc*-*-*} @item @uref{#powerpc-x-darwin,,powerpc-*-darwin*} @@ -4269,6 +4271,27 @@ Andes NDS32 target in big endian mode. @html
@end html +@anchor{nvptx-x-none} +@heading nvptx-*-none +Nvidia PTX target. + +Instead of GNU binutils, you will need to install +@uref{https://github.com/MentorEmbedded/nvptx-tools/,,nvptx-tools}. +Tell GCC where to find it: +@option{--with-build-time-tools=[install-nvptx-tools]/nvptx-none/bin}. + +A nvptx port of newlib is available at +@uref{https://github.com/MentorEmbedded/nvptx-newlib/,,nvptx-newlib}. +It can be automatically built together with GCC@. For this, add a +symbolic link to nvptx-newlib's @file{newlib} directory to the +directory containing the GCC sources. + +Use the @option{--disable-sjlj-exceptions} and +@option{--enable-newlib-io-long-long} options when configuring. + +@html +
+@end html @anchor{powerpc-x-x} @heading powerpc-*-* You can specify a default version for the @option{-mcpu=@var{cpu_type}} diff --git gcc/doc/invoke.texi gcc/doc/invoke.texi index ba81ec7..1fb329e 100644 --- gcc/doc/invoke.texi +++ gcc/doc/invoke.texi @@ -840,6 +840,9 @@ Objective-C and Objective-C++ Dialects}. -mcustom-fpu-cfg=@var{name} @gol -mhal -msmallc -msys-crt0=@var{name} -msys-lib=@var{name}} +@emph{Nvidia PTX Options} +@gccoptlist{-m32 -m64 -mmainkernel} + @emph{PDP-11 Options} @gccoptlist{-mfpu -msoft-float -mac0 -mno-ac0 -m40 -m45 -m10 @gol -mbcopy -mbcopy-builtin -mint32 -mno-int16 @gol @@ -11967,6 +11970,7 @@ platform. * MSP430 Options:: * NDS32 Options:: * Nios II Options:: +* Nvidia PTX Options:: * PDP-11 Options:: * picoChip Options:: * PowerPC Options:: @@ -18277,6 +18281,28 @@ This option is typically used to link with a library provided by a HAL BSP. @end table +@node Nvidia PTX Options +@subsection Nvidia PTX Options +@cindex Nvidia PTX options +@cindex nvptx options + +These options are defined for Nvidia PTX: + +@table @gcctabopt + +@item -m32 +@itemx -m64 +@opindex m32 +@opindex m64 +Generate code for 32-bit or 64-bit ABI. + +@item -mmainkernel +@opindex mmainkernel +Link in code for a __main kernel. This is for stand-alone instead of +offloading execution. + +@end table + @node PDP-11 Options @subsection PDP-11 Options @cindex PDP-11 Options