diff options
author | krebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-01 11:38:44 +0000 |
---|---|---|
committer | krebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-01 11:38:44 +0000 |
commit | db249f379e2e8541fb8771236fd6bb58be93658a (patch) | |
tree | cc7f08983662d64218a0f37a8aa58b7418282263 /gcc/config/s390/s390.h | |
parent | 5a750b73d49df155bd424c08952379c59eb8266f (diff) | |
download | gcc-db249f379e2e8541fb8771236fd6bb58be93658a.tar.gz |
S390: Support -mtune=native and -march=native.
gcc/ChangeLog
2015-06-01 Dominik Vogt <vogt@linux.vnet.ibm.com>
* config/s390/driver-native.c: New file.
* config/s390/x-native: New file.
* config.host: Add new files for s390.
* config/s390/s390.h (DRIVER_SELF_SPECS): Add support for -mtune=native
and -march=native
* config.gcc: Likewise.
* config/s390/s390.opt (march): Likewise; add PROCESSOR_NATIVE
* config/s390/s390-opts.h (enum processor_type): Ditto.
* config/s390/s390.c (s390_option_override): Catch unhandled
PROCESSOR_NATIVE
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223934 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/s390/s390.h')
-rw-r--r-- | gcc/config/s390/s390.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index a9bf9b5b1cb..85a0d1af65a 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -126,17 +126,27 @@ enum processor_flags { "arch", "%{!march=*:-march=%(VALUE)}" }, \ { "tune", "%{!mtune=*:-mtune=%(VALUE)}" } +extern const char *s390_host_detect_local_cpu (int argc, const char **argv); +# define EXTRA_SPEC_FUNCTIONS \ + { "local_cpu_detect", s390_host_detect_local_cpu }, + +# define MARCH_MTUNE_NATIVE_SPECS \ + " %{march=native:%<march=native %:local_cpu_detect(arch)}" \ + " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}" + /* Defaulting rules. */ #ifdef DEFAULT_TARGET_64BIT #define DRIVER_SELF_SPECS \ "%{!m31:%{!m64:-m64}}", \ "%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}}", \ - "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}" + "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}", \ + MARCH_MTUNE_NATIVE_SPECS #else #define DRIVER_SELF_SPECS \ "%{!m31:%{!m64:-m31}}", \ "%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}}", \ - "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}" + "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}", \ + MARCH_MTUNE_NATIVE_SPECS #endif /* Constants needed to control the TEST DATA CLASS (TDC) instruction. */ |