From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28372 invoked by alias); 2 Aug 2018 09:39:44 -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 28353 invoked by uid 89); 2 Aug 2018 09:39:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: foss.arm.com Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Aug 2018 09:39:41 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E069980D; Thu, 2 Aug 2018 02:39:39 -0700 (PDT) Received: from e120077-lin.cambridge.arm.com (e120077-lin.cambridge.arm.com [10.2.207.74]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CF2053F5D0; Thu, 2 Aug 2018 02:39:38 -0700 (PDT) Subject: Re: [PATCH] Print default options selection for -march,-mcpu and -mtune for aarch64 (PR driver/83193). To: =?UTF-8?Q?Martin_Li=c5=a1ka?= , gcc-patches@gcc.gnu.org Cc: Ramana Radhakrishnan , James Greenhalgh , Kyrill Tkachov References: <05543398-42fc-16f3-24bb-5996cde6f4e7@suse.cz> From: "Richard Earnshaw (lists)" Openpgp: preference=signencrypt Message-ID: <4708427a-dda3-82ff-c514-b3bc8b8445f6@arm.com> Date: Thu, 02 Aug 2018 09:39:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <05543398-42fc-16f3-24bb-5996cde6f4e7@suse.cz> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-08/txt/msg00167.txt.bz2 On 18/07/18 16:48, Martin Li¨ka wrote: > Hi. > > This is aarch64 fix for PR83193. It's about setting of default options > so that --help=target -Q prints proper numbers: > > Now this is seen on my cross-compiler: > > --- /home/marxin/Downloads/options-2-before.txt 2018-07-18 14:53:11.658146543 +0200 > +++ /home/marxin/Downloads/options-2.txt 2018-07-18 14:52:30.113274284 +0200 > @@ -1,10 +1,10 @@ > The following options are target specific: > -mabi=ABI lp64 > - -march=ARCH > + -march= armv8-a So we have -mabi=ABI lp64 but -march= armv8-a ^^^^^ blank Isn't that inconsistent? R. > -mbig-endian [disabled] > -mbionic [disabled] > -mcmodel= small > - -mcpu=CPU > + -mcpu= generic > -mfix-cortex-a53-835769 [enabled] > -mfix-cortex-a53-843419 [enabled] > -mgeneral-regs-only [disabled] > @@ -19,7 +19,7 @@ > -msve-vector-bits=N scalable > -mtls-dialect= desc > -mtls-size= 24 > - -mtune=CPU > + -mtune= generic > -muclibc [disabled] > > May I please ask ARM folks to test the patch? > Thanks, > Martin > > gcc/ChangeLog: > > 2018-07-18 Martin Liska > > PR driver/83193 > * config/aarch64/aarch64.c (aarch64_override_options_internal): > Set default values for x_aarch64_*_string strings. > * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}== > prefix. > --- > gcc/config/aarch64/aarch64.c | 7 +++++++ > gcc/config/aarch64/aarch64.opt | 6 +++--- > 2 files changed, 10 insertions(+), 3 deletions(-) > > > > 0001-Print-default-options-selection-for-march-mcpu-and-m.patch > > > diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c > index 6fa03e4b091..d48e6278efa 100644 > --- a/gcc/config/aarch64/aarch64.c > +++ b/gcc/config/aarch64/aarch64.c > @@ -10713,6 +10713,13 @@ aarch64_override_options_internal (struct gcc_options *opts) > && opts->x_optimize >= aarch64_tune_params.prefetch->default_opt_level) > opts->x_flag_prefetch_loop_arrays = 1; > > + if (opts->x_aarch64_arch_string == NULL) > + opts->x_aarch64_arch_string = selected_arch->name; > + if (opts->x_aarch64_cpu_string == NULL) > + opts->x_aarch64_cpu_string = selected_cpu->name; > + if (opts->x_aarch64_tune_string == NULL) > + opts->x_aarch64_tune_string = selected_tune->name; > + > aarch64_override_options_after_change_1 (opts); > } > > diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt > index 1426b45ff0f..7f0b65de37b 100644 > --- a/gcc/config/aarch64/aarch64.opt > +++ b/gcc/config/aarch64/aarch64.opt > @@ -117,15 +117,15 @@ Enum(aarch64_tls_size) String(48) Value(48) > > march= > Target RejectNegative ToLower Joined Var(aarch64_arch_string) > --march=ARCH Use features of architecture ARCH. > +Use features of architecture ARCH. > > mcpu= > Target RejectNegative ToLower Joined Var(aarch64_cpu_string) > --mcpu=CPU Use features of and optimize for CPU. > +Use features of and optimize for CPU. > > mtune= > Target RejectNegative ToLower Joined Var(aarch64_tune_string) > --mtune=CPU Optimize for CPU. > +Optimize for CPU. > > mabi= > Target RejectNegative Joined Enum(aarch64_abi) Var(aarch64_abi) Init(AARCH64_ABI_DEFAULT) >