From patchwork Wed Oct 25 14:50:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Christ X-Patchwork-Id: 158149 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6359:6b8b:b0:164:83eb:24d7 with SMTP id ta11csp2711161rwb; Wed, 25 Oct 2023 07:51:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGg/b1ObctcJ2ErU8KF0xOgeZqRAllENtHlEfTlEt5PjK1VXUbHlCS48ObDjtsnZZvTtCEh X-Received: by 2002:a05:620a:51d9:b0:775:cf5e:a66d with SMTP id cx25-20020a05620a51d900b00775cf5ea66dmr13952478qkb.24.1698245471755; Wed, 25 Oct 2023 07:51:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698245471; cv=pass; d=google.com; s=arc-20160816; b=NFJ2q/ub1WwqlmLRUA8f1MdcxyYUxy6f0a2//sHY56H4Ol+94GSIO1aeRb5GHYJm0O UkA2PW85B6FAmrLl1RqJ5b7vYDZNp6Ue5FbjgLDkET0qqnzdY7dCQmyjqYZ7GBV37Qst bRLQ5ldTx/x4k0+EePKvr/h1wfJjRktCsF8gd6reZmeR5wNKnEjtvCtACSaExOvyy/vw Fp/9AuD48TGSNii5V6rHYWDV6hAcdqmbLoSFTzGPbsbATbV13AkSZT5dusxOyn8FSK0Z RkQowbbMToV0umI3qC7vcGpi1PVhOqjOR8+8qk+k2iVX17Txp5ktqAbO7gMcxu1GF5B6 6sLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=HVUPa8NubTAqJfKbUgyBjo40aLpu7zUktOff78lZAXs=; fh=9kNvVTSI6DlgdGzGqx0+PqDVRbZ9BRNCe8aNB0KUSCk=; b=JJZ7N8yUONkU7evD3VoJAqZzgrU0+SYILo8JQmWILQZ7SJigiJkgsy2Jjy7Wic1OUI nA/eZRjK/fZDaOvfSQbsxsNNi8oxuUpZMiB2ns8R3ORQl5cnMNY9/A1P1UpYzASVsvda Qdy9EizDi7LrvoSDPYcnZ0xYCUR/hzw7ugN+oAz1bTKhjDJQOskfwUW2q3MX1ZV5i5JR 9DMRjE8JiXlCh5pCFL/dLo3mknuwf+ttOacCyxz6wHnsFbVxrqC1Al+U4mgsWuYxp9YN VngF4w2qBYfWVVjDmSv9ckS7yjaElSTWg6ePO6ul5QuW+zmGhEqqMva6TF4DQwfH7X75 xhzA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=BezkdmGe; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id h14-20020ac85e0e000000b0040fd57de68esi8625853qtx.512.2023.10.25.07.51.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 07:51:11 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=BezkdmGe; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7E5143857C44 for ; Wed, 25 Oct 2023 14:51:11 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 9267D385771B for ; Wed, 25 Oct 2023 14:50:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9267D385771B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9267D385771B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698245449; cv=none; b=nBZ5BHKKZlluMJvYcErHf0MUE5e6jaQcAPBKwvqPrNIW7lOxcB8df9+eee4zAF2Bc4J0GrbhbvNSSbjOpf47RzlZdf8KOc1pT+/KZiL7fdHCYaurBiaH2Os0jY9mmD3XZV+GXglBifZNvTs00BsKl3ZKlvggVctgAZQ/kLi95JE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698245449; c=relaxed/simple; bh=rndjPa7O6NXKKagFdc9bE7ICsKzv9LcSl58hYqT9fQU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=tcvubKlu1DfmqNmyjO93k0XPI7jf6UNoddFIwVFZbnPDgm28j12o4kQzYI86oEAzcfbW38AGBANwG1Z8s4TdZJhnKPA1vyOdSDA9EeTKLqnLxv0LUh94H9sAy4j//V7pB4VBTN1RJbv0fGSEDBxx0aaq7LXj0PSq/93N6KOQBys= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353726.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39PEgUUC026336 for ; Wed, 25 Oct 2023 14:50:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=HVUPa8NubTAqJfKbUgyBjo40aLpu7zUktOff78lZAXs=; b=BezkdmGeD2f3p3n4gJs+QD7ojv93HZ71JeTszl2U+DH8JdriOMjOjHDvz6C2YDRUC7pC EpDNG9ZLAlBy7tZ5khkmks3IvVrqGcbnWq22kgfwUYx8MxEj+VRAvnsiLhlJ2e74HBSI aBPiKLqYyWP2uGJcponGgQjeqZtgHDDnSRVau/bGS8SwJ9Kpv5zt37FUxYWc1SLlmtTe tPaxu6rdETPG7fYsSFzuDvhDyx8OQzLvq0jQFRTIj9tP3dB85ZoS7EwF6kqiK8/DbcU3 +LtVDbKcg3Hj1rrUNk7WiOkn+zZLBQdLKtyZCPpwkW/WJBqMtQAhsjdzR5MLBz4sAFPp NQ== Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ty50x07ys-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 25 Oct 2023 14:50:46 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 39PCFqF8012362 for ; Wed, 25 Oct 2023 14:50:45 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3tvup1xt35-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 25 Oct 2023 14:50:45 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 39PEogSf45154604 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Oct 2023 14:50:42 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 50B992004B; Wed, 25 Oct 2023 14:50:42 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 36B2320043; Wed, 25 Oct 2023 14:50:42 +0000 (GMT) Received: from li-3a824ecc-34fe-11b2-a85c-eae455c7d911.ibm.com (unknown [9.152.222.38]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 25 Oct 2023 14:50:42 +0000 (GMT) From: Juergen Christ To: krebbel@linux.ibm.com, gcc-patches@gcc.gnu.org Subject: [PATCH] s390: fix htm-builtins test cases Date: Wed, 25 Oct 2023 16:50:33 +0200 Message-Id: <20231025145033.33702-1-jchrist@linux.ibm.com> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: trnz-iKGOdHQZhtxP22ztwGCua95uwXU X-Proofpoint-ORIG-GUID: trnz-iKGOdHQZhtxP22ztwGCua95uwXU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-25_04,2023-10-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 mlxlogscore=965 impostorscore=0 mlxscore=0 spamscore=0 bulkscore=0 phishscore=0 malwarescore=0 clxscore=1011 priorityscore=1501 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310250128 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, KAM_SHORT, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780739443462707036 X-GMAIL-MSGID: 1780739443462707036 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 --- 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 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 --------------------- */