public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-9468] s390: fix htm-builtins test cases
@ 2024-03-14 13:08 Juergen Christ
0 siblings, 0 replies; only message in thread
From: Juergen Christ @ 2024-03-14 13:08 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:075104eef6d0ff215c394b6eaadcb525fa7c4975
commit r14-9468-g075104eef6d0ff215c394b6eaadcb525fa7c4975
Author: Juergen Christ <jchrist@linux.ibm.com>
Date: Wed Oct 25 14:57:03 2023 +0200
s390: fix htm-builtins test cases
Transactional and non-transactional stores to the same cache line cause
transactions to abort on newer generations. Add sufficient padding to make
sure another cache line is used.
Tested on s390.
gcc/testsuite/ChangeLog:
* gcc.target/s390/htm-builtins-1.c: Fix.
* gcc.target/s390/htm-builtins-2.c: Fix.
Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
Diff:
---
gcc/testsuite/gcc.target/s390/htm-builtins-1.c | 4 +++-
gcc/testsuite/gcc.target/s390/htm-builtins-2.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.target/s390/htm-builtins-1.c b/gcc/testsuite/gcc.target/s390/htm-builtins-1.c
index ff43be9fe73..4f95bf3acca 100644
--- a/gcc/testsuite/gcc.target/s390/htm-builtins-1.c
+++ b/gcc/testsuite/gcc.target/s390/htm-builtins-1.c
@@ -53,9 +53,11 @@ __attribute__ ((aligned(256))) struct
__attribute__ ((aligned(256))) struct
{
volatile uint64_t c1;
+ char pad1[256 - sizeof(uint64_t)];
volatile uint64_t c2;
+ char pad2[256 - sizeof(uint64_t)];
volatile uint64_t c3;
-} counters = { 0, 0, 0 };
+} counters = { 0 };
/* ---------------------------- local helper functions --------------------- */
diff --git a/gcc/testsuite/gcc.target/s390/htm-builtins-2.c b/gcc/testsuite/gcc.target/s390/htm-builtins-2.c
index bb9d346ea56..2e838caacc8 100644
--- a/gcc/testsuite/gcc.target/s390/htm-builtins-2.c
+++ b/gcc/testsuite/gcc.target/s390/htm-builtins-2.c
@@ -94,9 +94,11 @@ float global_float_3 = 0.0;
__attribute__ ((aligned(256))) struct
{
volatile uint64_t c1;
+ char pad1[256 - sizeof(uint64_t)];
volatile uint64_t c2;
+ char pad2[256 - sizeof(uint64_t)];
volatile uint64_t c3;
-} counters = { 0, 0, 0 };
+} counters = { 0 };
/* ---------------------------- local helper functions --------------------- */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-14 13:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-14 13:08 [gcc r14-9468] s390: fix htm-builtins test cases Juergen Christ
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).