public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Print default options selection for -march,-mcpu and -mtune for aarch64 (PR driver/83193).
@ 2018-07-18 15:48 Martin Liška
  2018-08-01 13:55 ` Martin Liška
  2018-08-02  9:39 ` Richard Earnshaw (lists)
  0 siblings, 2 replies; 7+ messages in thread
From: Martin Liška @ 2018-07-18 15:48 UTC (permalink / raw)
  To: gcc-patches; +Cc: Ramana Radhakrishnan, James Greenhalgh, Kyrill Tkachov

[-- Attachment #1: Type: text/plain, Size: 1578 bytes --]

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
   -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  <mliska@suse.cz>

        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(-)



[-- Attachment #2: 0001-Print-default-options-selection-for-march-mcpu-and-m.patch --]
[-- Type: text/x-patch, Size: 1541 bytes --]

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)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-08-24 12:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-18 15:48 [PATCH] Print default options selection for -march,-mcpu and -mtune for aarch64 (PR driver/83193) Martin Liška
2018-08-01 13:55 ` Martin Liška
2018-08-02  9:39 ` Richard Earnshaw (lists)
2018-08-02  9:46   ` Martin Liška
2018-08-23 11:01     ` Martin Liška
2018-08-23 14:46     ` Richard Earnshaw (lists)
2018-08-24 12:06       ` Martin Liška

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).