From patchwork Mon Aug 8 12:10:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 108897 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]) by ozlabs.org (Postfix) with SMTP id 3E668B6F70 for ; Mon, 8 Aug 2011 22:11:11 +1000 (EST) Received: (qmail 26174 invoked by alias); 8 Aug 2011 12:11:08 -0000 Received: (qmail 26159 invoked by uid 22791); 8 Aug 2011 12:11:02 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Aug 2011 12:10:34 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 9B5E2579; Mon, 8 Aug 2011 14:10:32 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id KmfatKS24+TR; Mon, 8 Aug 2011 14:10:30 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 67E8A578; Mon, 8 Aug 2011 14:10:30 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id p78CANoR003693; Mon, 8 Aug 2011 14:10:23 +0200 (MEST) From: Rainer Orth To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org, Paolo Bonzini Subject: Re: Support -mcpu=native on Solaris/SPARC References: <201108072232.07214.ebotcazou@adacore.com> Date: Mon, 08 Aug 2011 14:10:23 +0200 In-Reply-To: <201108072232.07214.ebotcazou@adacore.com> (Eric Botcazou's message of "Sun, 7 Aug 2011 22:32:07 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes 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 Eric Botcazou writes: >> 2011-07-27 Rainer Orth >> >> gcc: >> * config/sparc/driver-sparc.c: New file. >> * config/sparc/x-sparc: New file. >> * config.host: Use driver-sparc.o, sparc/x-sparc on >> sparc*-*-solaris2*. >> * config/sparc/sparc.opt (native): New value for enum >> processor_type. >> * config/sparc/sparc-opts.h (PROCESSOR_NATIVE): Declare. >> * config/sparc/sparc.c (sparc_option_override): Abort if >> PROCESSOR_NATIVE gets here. >> * config/sparc/sol2.h [__sparc__] (host_detect_local_cpu): Declare. >> (EXTRA_SPEC_FUNCTIONS, MCPU_MTUNE_NATIVE_SPECS, >> DRIVER_SELF_SPECS): Define. >> * configure.ac (EXTRA_GCC_LIBS): Check for libkstat. >> Substitute result. >> * configure: Regenerate. >> * Makefile.in (EXTRA_GCC_LIBS): Set. >> (xgcc$(exeext)): Add $(EXTRA_GCC_LIBS). >> (cpp$(exeext)): Likewise. > > OK if you document the new value in doc/invoke.texi, thanks in advance. Sure, done as follows: 2011-07-27 Rainer Orth * doc/invoke.texi (SPARC Options, -mcpu): Document native. (SPARC Options, -mtune): Likewise. Tested in a i386-pc-solaris2.11 bootstrap and visual inspection with info. Installed on mainline. Thanks. Rainer diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -17263,6 +17263,11 @@ for machine type @var{cpu_type}. Suppor @samp{sparclet}, @samp{tsc701}, @samp{v9}, @samp{ultrasparc}, @samp{ultrasparc3}, @samp{niagara} and @samp{niagara2}. +Native Solaris toolchains also support the value @samp{native}, +which selects the best architecture option for the host processor. +@option{-mcpu=native} has no effect if GCC does not recognize +the processor. + Default instruction scheduling parameters are used for values that select an architecture and not an implementation. These are @samp{v7}, @samp{v8}, @samp{sparclite}, @samp{sparclet}, @samp{v9}. @@ -17327,7 +17332,8 @@ The same values for @option{-mcpu=@var{c that select a particular CPU implementation. Those are @samp{cypress}, @samp{supersparc}, @samp{hypersparc}, @samp{leon}, @samp{f930}, @samp{f934}, @samp{sparclite86x}, @samp{tsc701}, @samp{ultrasparc}, @samp{ultrasparc3}, -@samp{niagara}, and @samp{niagara2}. +@samp{niagara}, and @samp{niagara2}. With native Solaris toolchains, +@samp{native} can also be used. @item -mv8plus @itemx -mno-v8plus