From f4615940b171c449a0e799195dbd28041f677f35 Mon Sep 17 00:00:00 2001 From: Peter Bergner Date: Wed, 13 Dec 2017 15:20:51 -0600 Subject: [PATCH] ppc-auxv.h (PPC_FEATURE2_HTM_NO_SUSPEND): New define. gcc/ * config/rs6000/ppc-auxv.h (PPC_FEATURE2_HTM_NO_SUSPEND): New define. * config/rs6000/rs6000.c (cpu_supports_info): Use it. gcc/testsuite/ * gcc.target/powerpc/cpu-builtin-1.c (htm-no-suspend): Add test. From-SVN: r255614 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/ppc-auxv.h | 1 + gcc/config/rs6000/rs6000.c | 1 + gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c | 1 + 5 files changed, 12 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eafe926b0e7..c47696cd8a0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-12-13 Peter Bergner + + * config/rs6000/ppc-auxv.h (PPC_FEATURE2_HTM_NO_SUSPEND): New define. + * config/rs6000/rs6000.c (cpu_supports_info): Use it. + 2017-12-13 Alexandre Oliva PR bootstrap/83396 diff --git a/gcc/config/rs6000/ppc-auxv.h b/gcc/config/rs6000/ppc-auxv.h index dcee28a8152..0bd3bc4332f 100644 --- a/gcc/config/rs6000/ppc-auxv.h +++ b/gcc/config/rs6000/ppc-auxv.h @@ -91,6 +91,7 @@ #define PPC_FEATURE2_HAS_IEEE128 0x00400000 #define PPC_FEATURE2_DARN 0x00200000 #define PPC_FEATURE2_SCV 0x00100000 +#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* 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 9ed90bfda32..995ae0482fb 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -388,6 +388,7 @@ static const struct { "ebb", PPC_FEATURE2_HAS_EBB, 1 }, { "htm", PPC_FEATURE2_HAS_HTM, 1 }, { "htm-nosc", PPC_FEATURE2_HTM_NOSC, 1 }, + { "htm-no-suspend", PPC_FEATURE2_HTM_NO_SUSPEND, 1 }, { "isel", PPC_FEATURE2_HAS_ISEL, 1 }, { "tar", PPC_FEATURE2_HAS_TAR, 1 }, { "vcrypto", PPC_FEATURE2_HAS_VEC_CRYPTO, 1 }, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5a3d8f2a3f0..4529bcaa185 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2017-12-13 Peter Bergner + + * gcc.target/powerpc/cpu-builtin-1.c (htm-no-suspend): Add test. + 2017-12-13 Paolo Carlini PR c++/81061 diff --git a/gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c b/gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c index c190f246231..960e7fb4f5f 100644 --- a/gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c +++ b/gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c @@ -73,6 +73,7 @@ use_cpu_supports_builtins (unsigned int *p) p[37] = __builtin_cpu_supports ("vsx"); p[38] = __builtin_cpu_supports ("darn"); p[39] = __builtin_cpu_supports ("scv"); + p[40] = __builtin_cpu_supports ("htm-no-suspend"); #else p[0] = 0; #endif -- 2.30.2