]> git.ipfire.org Git - thirdparty/gcc.git/commit
PowerPC: Add power10 hwcap2 bits
authorMichael Meissner <meissner@linux.ibm.com>
Wed, 1 Jul 2020 19:42:21 +0000 (14:42 -0500)
committerPeter Bergner <bergner@linux.ibm.com>
Thu, 2 Jul 2020 17:29:07 +0000 (12:29 -0500)
commit7549286a494ef8bc4c1107724735ca867c19cefb
tree2583d1c19694e30ae7724855be82adfc73ae5c4f
parent45b8704681346513265493e00e876fac298d62c4
PowerPC: Add power10 hwcap2 bits

This patch adds support for the two new HWCAP2 fields used by the
__builtin_cpu_supports function.  It adds support in the target_clones
attribute for -mcpu=power10.

The two new __builtin_cpu_supports tests are:
__builtin_cpu_supports ("arch_3_1")
__builtin_cpu_supports ("mma")

The bits used are the bits that the Linux kernel engineers will be using for
these new features.

2020-06-05  Michael Meissner  <meissner@linux.ibm.com>

gcc/
* config/rs6000/ppc-auxv.h (PPC_PLATFORM_POWER10): Allocate
'power10' PowerPC platform.
(PPC_FEATURE2_ARCH_3_1): New HWCAP2 bit for ARCH 3.1.
(PPC_FEATURE2_MMA): New HWCAP2 bit for MMA.
* config/rs6000/rs6000-call.c (cpu_supports_info): Add ARCH 3.1 and
MMA HWCAP2 bits.

gcc/testsuite/
* gcc.target/powerpc/clone3.c: New test for using 'power10' with
the target_clones attribute.

(cherry picked from commit 2753f2f8b4a4534ab364595ba4b8a913cc7254a7)
(cherry picked from commit 7ba33e898fa4a097c0f2b4d9cae35041a5933f9c)
gcc/config/rs6000/ppc-auxv.h
gcc/config/rs6000/rs6000-call.c
gcc/testsuite/gcc.target/powerpc/clone3.c [new file with mode: 0644]