PR target/97250: i386: Add support for x86-64-v2, x86-64-v3, x86-64-v4 levels for...
authorFlorian Weimer <fweimer@redhat.com>
Thu, 1 Oct 2020 08:08:24 +0000 (10:08 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 1 Oct 2020 08:08:24 +0000 (10:08 +0200)
commit324bec558e95584e8c1997575ae9d75978af59f1
tree9d8b79794807d2176bb341bcc6a76cacd624ce24
parent2c5499b57cf4a68ebc8decce90d3eb1e281c31a9
PR target/97250: i386: Add support for x86-64-v2, x86-64-v3, x86-64-v4 levels for x86-64

These micro-architecture levels are defined in the x86-64 psABI:

https://gitlab.com/x86-psABIs/x86-64-ABI/-/commit/77566eb03bc6a326811cb7e9

PTA_NO_TUNE is introduced so that the new processor alias table entries
do not affect the CPU tuning setting in ix86_tune.

The tests depend on the macros added in commit 92e652d8c21bd7e66cbb0f900
("i386: Define __LAHF_SAHF__ and __MOVBE__ macros, based on ISA flags").

gcc/:
PR target/97250
* config/i386/i386.h (PTA_NO_TUNE, PTA_X86_64_BASELINE)
(PTA_X86_64_V2, PTA_X86_64_V3, PTA_X86_64_V4): New.
* common/config/i386/i386-common.c (processor_alias_table):
Add "x86-64-v2", "x86-64-v3", "x86-64-v4".
* config/i386/i386-options.c (ix86_option_override_internal):
Handle new PTA_NO_TUNE processor table entries.
* doc/invoke.texi (x86 Options): Document new -march values.

gcc/testsuite/:
PR target/97250
* gcc.target/i386/x86-64-v2.c: New test.
* gcc.target/i386/x86-64-v3.c: New test.
* gcc.target/i386/x86-64-v3-haswell.c: New test.
* gcc.target/i386/x86-64-v3-skylake.c: New test.
* gcc.target/i386/x86-64-v4.c: New test.
gcc/common/config/i386/i386-common.c
gcc/config/i386/i386-options.c
gcc/config/i386/i386.h
gcc/doc/invoke.texi
gcc/testsuite/gcc.target/i386/x86-64-v2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/x86-64-v3-haswell.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/x86-64-v3-skylake.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/x86-64-v3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/x86-64-v4.c [new file with mode: 0644]