From 782a7850edea0ef5007b180686048515db9f6f26 Mon Sep 17 00:00:00 2001 From: Peter Bergner Date: Fri, 28 Jul 2017 15:10:45 -0500 Subject: [PATCH] ppc-auxv.h (PPC_FEATURE2_DARN): New define. gcc/ * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define. (PPC_FEATURE2_SCV): Likewise. * config/rs6000/rs6000.c (cpu_supports_info): Use them. gcc/testsuite/ * gcc.target/powerpc/cpu-builtin-1.c (darn, scv): Add tests. From-SVN: r250687 --- gcc/ChangeLog | 6 ++++++ gcc/config/rs6000/ppc-auxv.h | 2 ++ gcc/config/rs6000/rs6000.c | 4 +++- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c | 2 ++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 327e470d285..bdf4d3d6f7b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-07-28 Peter Bergner + + * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define. + (PPC_FEATURE2_SCV): Likewise. + * config/rs6000/rs6000.c (cpu_supports_info): Use them. + 2017-07-28 Tamar Christina * config/aarch64/aarch64.c diff --git a/gcc/config/rs6000/ppc-auxv.h b/gcc/config/rs6000/ppc-auxv.h index c7e2e0bfbf2..dcee28a8152 100644 --- a/gcc/config/rs6000/ppc-auxv.h +++ b/gcc/config/rs6000/ppc-auxv.h @@ -89,6 +89,8 @@ #define PPC_FEATURE2_HTM_NOSC 0x01000000 #define PPC_FEATURE2_ARCH_3_00 0x00800000 #define PPC_FEATURE2_HAS_IEEE128 0x00400000 +#define PPC_FEATURE2_DARN 0x00200000 +#define PPC_FEATURE2_SCV 0x00100000 /* Thread Control Block (TCB) offsets of the AT_PLATFORM, AT_HWCAP and diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 2fcec13b3f3..386a5cebc2f 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -375,7 +375,9 @@ static const struct { "tar", PPC_FEATURE2_HAS_TAR, 1 }, { "vcrypto", PPC_FEATURE2_HAS_VEC_CRYPTO, 1 }, { "arch_3_00", PPC_FEATURE2_ARCH_3_00, 1 }, - { "ieee128", PPC_FEATURE2_HAS_IEEE128, 1 } + { "ieee128", PPC_FEATURE2_HAS_IEEE128, 1 }, + { "darn", PPC_FEATURE2_DARN, 1 }, + { "scv", PPC_FEATURE2_SCV, 1 } }; /* On PowerPC, we have a limited number of target clones that we care about diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d8d60abd536..d2682dc7094 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2017-07-28 Peter Bergner + + * gcc.target/powerpc/cpu-builtin-1.c (darn, scv): Add tests. + 2017-07-28 Tamar Christina * gcc.target/aarch64/int_mov_immediate_1.c: New. diff --git a/gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c b/gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c index 1de4b6980af..c190f246231 100644 --- a/gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c +++ b/gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c @@ -71,6 +71,8 @@ use_cpu_supports_builtins (unsigned int *p) p[35] = __builtin_cpu_supports ("ucache"); p[36] = __builtin_cpu_supports ("vcrypto"); p[37] = __builtin_cpu_supports ("vsx"); + p[38] = __builtin_cpu_supports ("darn"); + p[39] = __builtin_cpu_supports ("scv"); #else p[0] = 0; #endif -- 2.30.2