diff options
author | Juergen Christ <jchrist@linux.ibm.com> | 2023-10-25 14:57:03 +0200 |
---|---|---|
committer | Juergen Christ <jchrist@linux.ibm.com> | 2024-03-14 14:06:56 +0100 |
commit | 075104eef6d0ff215c394b6eaadcb525fa7c4975 (patch) | |
tree | 7fa8b2d050f2a0dc486fd4e380c85415656d4a0c | |
parent | e6836bbbd7a01af0791c02087e568b4822418c0d (diff) | |
download | gcc-075104eef6d0ff215c394b6eaadcb525fa7c4975.zip gcc-075104eef6d0ff215c394b6eaadcb525fa7c4975.tar.gz gcc-075104eef6d0ff215c394b6eaadcb525fa7c4975.tar.bz2 |
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>
-rw-r--r-- | gcc/testsuite/gcc.target/s390/htm-builtins-1.c | 4 | ||||
-rw-r--r-- | 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 ff43be9..4f95bf3 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 bb9d346..2e838ca 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 --------------------- */ |