From 7eb38f05ee140b38aa337613761c8dc4eddd3509 Mon Sep 17 00:00:00 2001 From: Peter Bergner Date: Wed, 13 Dec 2017 21:43:10 -0600 Subject: [PATCH] backport: ppc-auxv.h (PPC_FEATURE2_HTM_NO_SUSPEND): New define. gcc/ Backport from mainline 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. gcc/testsuite/ Backport from mainline 2017-12-13 Peter Bergner * gcc.target/powerpc/cpu-builtin-1.c (htm-no-suspend): Add test. From-SVN: r255622 --- gcc/ChangeLog | 8 ++++++++ gcc/config/rs6000/ppc-auxv.h | 1 + gcc/config/rs6000/rs6000.c | 1 + gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c | 1 + 5 files changed, 18 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 598a35ba916..48e7cffef15 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2017-12-13 Peter Bergner + + Backport from mainline + 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-11 Michael Meissner Back port from trunk 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 aa6ad717954..d2c7dc79e58 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -375,6 +375,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 37f6fa4403e..1221818f785 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2017-12-13 Peter Bergner + + Backport from mainline + 2017-12-13 Peter Bergner + + * gcc.target/powerpc/cpu-builtin-1.c (htm-no-suspend): Add test. + 2017-12-11 Michael Meissner Back port from trunk diff --git a/gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c b/gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c index 8a1f7c86013..928131b52ce 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