From: "Martin Liška" <mliska@suse.cz>
To: gcc-patches@gcc.gnu.org
Cc: Jakub Jelinek <jakub@redhat.com>, Jan Hubicka <hubicka@ucw.cz>
Subject: [PATCH] Add "native" as a valid option value for -march= on i386 (PR driver/83193).
Date: Tue, 20 Feb 2018 13:25:00 -0000 [thread overview]
Message-ID: <f6ef8fc4-43b4-8e1a-34ef-3379ea4d69c7@suse.cz> (raw)
[-- Attachment #1: Type: text/plain, Size: 2252 bytes --]
Hi.
Following patch adds "native" as a possible option for -march value on i386 target.
I have similar patches for other targets. Would it be possible to install the
patch in current stage?
Before:
$ ./xgcc -B. -march=abcdef /tmp/empty.c
cc1: error: bad value (âabcdefâ) for â-march=â switch
cc1: note: valid arguments to â-march=â switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake bonnell atom silvermont slm knl knm x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2
After:
$ ./xgcc -B. -march=abcdef /tmp/empty.c
cc1: error: bad value (âabcdefâ) for â-march=â switch
cc1: note: valid arguments to â-march=â switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake bonnell atom silvermont slm knl knm x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2 native
$ ./xgcc -B. -march=native2 /tmp/empty.c
cc1: error: bad value (ânative2â) for â-march=â switch
cc1: note: valid arguments to â-march=â switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake bonnell atom silvermont slm knl knm x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2 native; did you mean ânativeâ?
Ready for trunk after tests?
Thanks
Martin
gcc/ChangeLog:
2018-02-20 Martin Liska <mliska@suse.cz>
PR driver/83193
* config/i386/i386.c (ix86_option_override_internal):
Add "native" as a possible value.
---
gcc/config/i386/i386.c | 3 +++
1 file changed, 3 insertions(+)
[-- Attachment #2: 0001-Add-native-as-a-valid-option-value-for-march-on-i386.patch --]
[-- Type: text/x-patch, Size: 554 bytes --]
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index d54e7301e84..361d4df2663 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4193,6 +4193,9 @@ ix86_option_override_internal (bool main_args_p,
|| ((processor_alias_table[i].flags & PTA_64BIT) != 0)))
candidates.safe_push (processor_alias_table[i].name);
+ /* Add also "native" as possible value. */
+ candidates.safe_push ("native");
+
char *s;
const char *hint
= candidates_list_and_hint (opts->x_ix86_arch_string, s, candidates);
next reply other threads:[~2018-02-20 13:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-20 13:25 Martin Liška [this message]
2018-02-20 15:58 ` Richard Sandiford
2018-02-20 17:49 ` Jakub Jelinek
2018-02-20 16:19 ` Richard Sandiford
2018-02-20 16:26 ` Martin Liška
2018-02-21 7:33 ` Martin Liška
2018-02-21 19:49 ` Jakub Jelinek
2018-02-21 14:19 ` Martin Liška
2018-02-21 14:23 ` Jakub Jelinek
2018-02-21 7:34 ` Add "native" as a valid option value for -march= on arm " Martin Liška
2018-02-21 9:24 ` Kyrill Tkachov
2018-02-21 9:53 ` Martin Liška
2018-02-21 12:26 ` Kyrill Tkachov
2018-02-21 14:03 ` Martin Liška
2018-02-22 8:52 ` Martin Liška
2018-02-22 10:59 ` Kyrill Tkachov
2018-02-22 12:16 ` Martin Liška
2018-03-08 9:02 ` Martin Liška
2018-03-09 15:43 ` Kyrill Tkachov
2018-03-09 15:46 ` Martin Liška
2018-02-21 7:35 ` [PATCH] Add "native" as a valid option value for -march= on aarch64 " Martin Liška
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f6ef8fc4-43b4-8e1a-34ef-3379ea4d69c7@suse.cz \
--to=mliska@suse.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=jakub@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).