From: Juergen Christ Date: Wed, 25 Oct 2023 12:57:03 +0000 (+0200) Subject: s390: fix htm-builtins test cases X-Git-Tag: basepoints/gcc-15~671 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=075104eef6d0ff215c394b6eaadcb525fa7c4975;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/testsuite/gcc.target/s390/htm-builtins-1.c b/gcc/testsuite/gcc.target/s390/htm-builtins-1.c index ff43be9fe736..4f95bf3accaa 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 bb9d346ea560..2e838caacc8c 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 --------------------- */