From patchwork Wed Feb 5 13:23:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Greenhalgh X-Patchwork-Id: 317129 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 4A7852C0097 for ; Thu, 6 Feb 2014 00:23:46 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=crT0qFvjeuhqKcn4L QYB7PaytpopbRrYU2s22jgLvTZhY1z95pB6fZTH2PYaFTpjUwDpox6AIx6LxvXU+ s2jEjI9lDLvA98l9rAnuof6+MfIX1TZhn67bq3AK7KNp+RkLUwywCxS0dV+5Tc8L rJZNZs+hQHwGtYWaLLyylrZ15I= 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=4il8eLz5YRid87IQ3cOaamc UVJw=; b=w4uc55B0YeEzh/4o1ylrSLnv41O9V4wIkrucNaj2efH2x7WhEFiuPJQ FWSb4pQiLIglXI/4wx6euZ+DliDw+9VAvA50Pqyn08CehHZS2y5afnOgmkjyIpLV FheiukwgWwdkytY9q6CFNdGK0hd3T8lomNmBkkWdSPC5ssQWQPs4= Received: (qmail 16249 invoked by alias); 5 Feb 2014 13:23:36 -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 16238 invoked by uid 89); 5 Feb 2014 13:23:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: cam-smtp0.cambridge.arm.com Received: from fw-tnat.cambridge.arm.com (HELO cam-smtp0.cambridge.arm.com) (217.140.96.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 05 Feb 2014 13:23:34 +0000 Received: from arm.com (e106375-lin.cambridge.arm.com [10.1.203.155]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id s15DNUiv005343; Wed, 5 Feb 2014 13:23:30 GMT Date: Wed, 5 Feb 2014 13:23:30 +0000 From: James Greenhalgh To: Ramana Radhakrishnan Cc: "gcc-patches@gcc.gnu.org" , Richard Earnshaw Subject: Re: [ARM Documentation] Clarify -mcpu, -mtune, -march Message-ID: <20140205132330.GA18520@arm.com> References: <1390816911-25787-1-git-send-email-james.greenhalgh@arm.com> <52F21A52.4030005@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <52F21A52.4030005@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes On Wed, Feb 05, 2014 at 11:02:42AM +0000, Ramana Radhakrishnan wrote: > On 01/27/14 10:01, James Greenhalgh wrote: > > > > Hi, > > > > I've tripped myself over with these three options too many times, > > actually, their behaviour is very simple. > > > > This patch clarifies the language used to describe the options, and > > puts them in a logical order. I'm happy to reword again if this > > is still not clear. > > > > OK? > > > > Thanks, > > James > > > > --- > > gcc/ > > > > 2014-01-27 James Greenhalgh > > > > PR target/59718 > > * doc/invoke.texi (-march=): Clarify documentation for ARM. > > (-mtune=): Likewise. > > (-mcpu=): Likewise. > > > > > Ok with those changes. Thanks, I've attached what I ended up committing. As far as I know the behaviour of this flag has always been this way. So is this also OK to backport to release branches? Thanks, James From b72249d400685a3c1a2e7eee5ad21db86006d34c Mon Sep 17 00:00:00 2001 From: James Greenhalgh Date: Wed, 8 Jan 2014 12:26:12 +0000 Subject: [ARM Documentation] Clarify -mcpu, -mtune, -march MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.8.3-rc0" This is a multi-part message in MIME format. --------------1.8.3-rc0 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit Hi, I've tripped myself over with these three options too many times, actually, their behaviour is very simple. This patch clarifies the language used to describe the options, and puts them in a logical order. I'm happy to reword again if this is still not clear. OK? Thanks, James --- gcc/ 2014-02-05 James Greenhalgh PR target/59718 * doc/invoke.texi (-march=): Clarify documentation for ARM. (-mtune=): Likewise. (-mcpu=): Likewise. --------------1.8.3-rc0 Content-Type: text/x-patch; name="0001-ARM-Documentation-Clarify-mcpu-mtune-march.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-ARM-Documentation-Clarify-mcpu-mtune-march.patch" diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 640c123..e3dc9df 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -12221,11 +12221,38 @@ option should only be used if you require compatibility with code for big-endian ARM processors generated by versions of the compiler prior to 2.8. This option is now deprecated. -@item -mcpu=@var{name} -@opindex mcpu -This specifies the name of the target ARM processor. GCC uses this name -to determine what kind of instructions it can emit when generating -assembly code. Permissible names are: @samp{arm2}, @samp{arm250}, +@item -march=@var{name} +@opindex march +This specifies the name of the target ARM architecture. GCC uses this +name to determine what kind of instructions it can emit when generating +assembly code. This option can be used in conjunction with or instead +of the @option{-mcpu=} option. Permissible names are: @samp{armv2}, +@samp{armv2a}, @samp{armv3}, @samp{armv3m}, @samp{armv4}, @samp{armv4t}, +@samp{armv5}, @samp{armv5t}, @samp{armv5e}, @samp{armv5te}, +@samp{armv6}, @samp{armv6j}, +@samp{armv6t2}, @samp{armv6z}, @samp{armv6zk}, @samp{armv6-m}, +@samp{armv7}, @samp{armv7-a}, @samp{armv7-r}, @samp{armv7-m}, @samp{armv7ve}, +@samp{armv8-a}, @samp{armv8-a+crc}, +@samp{iwmmxt}, @samp{iwmmxt2}, @samp{ep9312}. + +@option{-march=armv7ve} is the armv7-a architecture with virtualization +extensions. + +@option{-march=armv8-a+crc} enables code generation for the ARMv8-A +architecture together with the optional CRC32 extensions. + +@option{-march=native} causes the compiler to auto-detect the architecture +of the build computer. At present, this feature is only supported on +Linux, and not all architectures are recognized. If the auto-detect is +unsuccessful the option has no effect. + +@item -mtune=@var{name} +@opindex mtune +This option specifies the name of the target ARM processor for +which GCC should tune the performance of the code. +For some ARM implementations better performance can be obtained by using +this option. +Permissible names are: @samp{arm2}, @samp{arm250}, @samp{arm3}, @samp{arm6}, @samp{arm60}, @samp{arm600}, @samp{arm610}, @samp{arm620}, @samp{arm7}, @samp{arm7m}, @samp{arm7d}, @samp{arm7dm}, @samp{arm7di}, @samp{arm7dmi}, @samp{arm70}, @samp{arm700}, @@ -12259,26 +12286,6 @@ Additionally, this option can specify that GCC should tune the performance of the code for a big.LITTLE system. Permissible names are: @samp{cortex-a15.cortex-a7}, @samp{cortex-a57.cortex-a53}. -@option{-mcpu=generic-@var{arch}} is also permissible, and is -equivalent to @option{-march=@var{arch} -mtune=generic-@var{arch}}. -See @option{-mtune} for more information. - -@option{-mcpu=native} causes the compiler to auto-detect the CPU -of the build computer. At present, this feature is only supported on -Linux, and not all architectures are recognized. If the auto-detect is -unsuccessful the option has no effect. - -@item -mtune=@var{name} -@opindex mtune -This option is very similar to the @option{-mcpu=} option, except that -instead of specifying the actual target processor type, and hence -restricting which instructions can be used, it specifies that GCC should -tune the performance of the code as if the target were of the type -specified in this option, but still choosing the instructions it -generates based on the CPU specified by a @option{-mcpu=} option. -For some ARM implementations better performance can be obtained by using -this option. - @option{-mtune=generic-@var{arch}} specifies that GCC should tune the performance for a blend of processors within architecture @var{arch}. The aim is to generate code that run well on the current most popular @@ -12291,27 +12298,23 @@ of the build computer. At present, this feature is only supported on Linux, and not all architectures are recognized. If the auto-detect is unsuccessful the option has no effect. -@item -march=@var{name} -@opindex march -This specifies the name of the target ARM architecture. GCC uses this -name to determine what kind of instructions it can emit when generating -assembly code. This option can be used in conjunction with or instead -of the @option{-mcpu=} option. Permissible names are: @samp{armv2}, -@samp{armv2a}, @samp{armv3}, @samp{armv3m}, @samp{armv4}, @samp{armv4t}, -@samp{armv5}, @samp{armv5t}, @samp{armv5e}, @samp{armv5te}, -@samp{armv6}, @samp{armv6j}, -@samp{armv6t2}, @samp{armv6z}, @samp{armv6zk}, @samp{armv6-m}, -@samp{armv7}, @samp{armv7-a}, @samp{armv7-r}, @samp{armv7-m}, @samp{armv7ve}, -@samp{armv8-a}, @samp{armv8-a+crc}, -@samp{iwmmxt}, @samp{iwmmxt2}, @samp{ep9312}. +@item -mcpu=@var{name} +@opindex mcpu +This specifies the name of the target ARM processor. GCC uses this name +to derive the name of the target ARM architecture (as if specified +by @option{-march}) and the ARM processor type for which to tune for +performance (as if specified by @option{-mtune}). Where this option +is used in conjunction with @option{-march} or @option{-mtune}, +those options take precedence over the appropriate part of this option. -@option{-march=armv7ve} is the armv7-a architecture with virtualization -extensions. +Permissible names for this option are the same as those for +@option{-mtune}. -@option{-march=armv8-a+crc} enables code generation for the ARMv8-A -architecture together with the optional CRC32 extensions. +@option{-mcpu=generic-@var{arch}} is also permissible, and is +equivalent to @option{-march=@var{arch} -mtune=generic-@var{arch}}. +See @option{-mtune} for more information. -@option{-march=native} causes the compiler to auto-detect the architecture +@option{-mcpu=native} causes the compiler to auto-detect the CPU of the build computer. At present, this feature is only supported on Linux, and not all architectures are recognized. If the auto-detect is unsuccessful the option has no effect. --------------1.8.3-rc0--