Message ID | 20230124084701.258605-1-stefansf@linux.ibm.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2040652wrn; Tue, 24 Jan 2023 00:56:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXsxKXf7cEQOR8wsXGR+dxJ9tsZmvgH0xpqkFg0FskXmqJNm+MzPM1n8wve8Eo+2t3F3eF8r X-Received: by 2002:aa7:de94:0:b0:474:a583:2e1a with SMTP id j20-20020aa7de94000000b00474a5832e1amr28099297edv.12.1674550595422; Tue, 24 Jan 2023 00:56:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674550595; cv=none; d=google.com; s=arc-20160816; b=YsFzhngfevGUE/j61LoTK4NmEbZhG1j0OVrpp7fAA0SoVR5pDF/aTlDIiNMzUE5yzr 5QwqcjmyHJ7pPKJ5FjZBswNiA/3HFx1tcgPgC4dqfSsy6dc3PnCa2mip0NCO4pnf2Fbu 4yOe6OhC4lDakRzhA8fjbuKaPgBKqU2ZQKAEyTf64+Svz0Nc+++LCvVZTu8WvWUUXsOL zk9lPiZfihu2PM17eiFfD4lfAcIIyPLBdJ31fc6TMfvRN+w6c7/rZVipWGGaGBWOEglC JVeHlA7g4FhVn0Wax8ghM0posilFpsdrWyOSyXb2vyvNENaO7hG+rxL+lFuDsP1Igy8V W8IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=xoJZx69WWoWVRwf1lpbp9MqFUTrwuu33sel7uEUIzNs=; b=CC8RdhvzOXycBz3t3fTjJ64PxQANc2HchftPp3sx1Kh4AQzbqL/6jYk5LBVRTcsC6Y 8dNNIe7oboSU3qx7znJ7xzID3OyKzukdxBhRybn1Zigg0MKD2SjC+hb274xHPMwLMTuS pBMLvpbC2C3CvH1QXv0mCv1iwPS3WCHHjfRWZLcAcqQHE7NEm9Bjv7YWqaka8evhlMku YmnoLHrf6rHb6Y6ubNbjnfS+/TOzDh2CPFvVRMPd+5j/M7kQt/laJ6M90KeMhs8rI6q/ NPzP/RRK+oaiRPRV+jO+K+TDanB3V6WENECUGawcCE7ZXfn1sKjo7kxipQN+ijUPTp+A pq3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=riuoPerR; 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=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id v23-20020a056402185700b0049e9fe9abc1si2330937edy.389.2023.01.24.00.56.35 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 00:56:35 -0800 (PST) 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=@gcc.gnu.org header.s=default header.b=riuoPerR; 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=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 948213858C2D for <ouuuleilei@gmail.com>; Tue, 24 Jan 2023 08:56:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 948213858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674550591; bh=xoJZx69WWoWVRwf1lpbp9MqFUTrwuu33sel7uEUIzNs=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=riuoPerRcAFhpoomSVTq0HFtOEFdpjZcw4WFgRD6UsPnK7qdHj539t1WjZsSkfogy Z3effRMiwgTcJcS1wLdXszNYg5NCXlIrVLMFssWo05RwGZOrkv0Fz3p+vN6QN/T8qy +kD8Y92lYxWiPYbaSQ20fNBB0btyFhcFYY+5EY3c= 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 1B83E3858C54 for <gcc-patches@gcc.gnu.org>; Tue, 24 Jan 2023 08:55:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1B83E3858C54 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30O6ul8r021794; Tue, 24 Jan 2023 08:55:40 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3naagtje6w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Jan 2023 08:55:39 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30O5590S027489; Tue, 24 Jan 2023 08:55:37 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma04ams.nl.ibm.com (PPS) with ESMTPS id 3n87p6bfxs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Jan 2023 08:55:37 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30O8tXPh53019132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Jan 2023 08:55:33 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BE3DE20043; Tue, 24 Jan 2023 08:55:33 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 862CE20040; Tue, 24 Jan 2023 08:55:33 +0000 (GMT) Received: from a35lp68.lnxne.boe (unknown [9.152.108.100]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTPS; Tue, 24 Jan 2023 08:55:33 +0000 (GMT) To: Iain Buclaw <ibuclaw@gdcproject.org>, krebbel@linux.ibm.com, gcc-patches@gcc.gnu.org Cc: Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> Subject: [PATCH v2] IBM zSystems: Fix TARGET_D_CPU_VERSIONS Date: Tue, 24 Jan 2023 09:47:02 +0100 Message-Id: <20230124084701.258605-1-stefansf@linux.ibm.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <Y87V0JqLRLrK3GXP@li-42a4824c-28a0-11b2-a85c-f55c0d5956ce.ibm.com> References: <Y87V0JqLRLrK3GXP@li-42a4824c-28a0-11b2-a85c-f55c0d5956ce.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 30Lsq8FSEPKV2OAuInKPhloCmmiwlI0D X-Proofpoint-GUID: 30Lsq8FSEPKV2OAuInKPhloCmmiwlI0D Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-23_12,2023-01-23_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 spamscore=0 impostorscore=0 phishscore=0 priorityscore=1501 adultscore=0 bulkscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301240077 X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, 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.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Stefan Schulze Frielinghaus via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754931030388329830?= X-GMAIL-MSGID: =?utf-8?q?1755893564878128542?= |
Series |
[v2] IBM zSystems: Fix TARGET_D_CPU_VERSIONS
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Stefan Schulze Frielinghaus
Jan. 24, 2023, 8:47 a.m. UTC
In the context of D the interpretation of S390, S390X, and SystemZ is a bit fuzzy. The wording S390X was wrongly deprecated in favour of SystemZ by commit https://github.com/dlang/dlang.org/commit/3b50a4c3faf01c32234d0ef8be5f82915a61c23f Thus, SystemZ is used for 64-bit targets, now, and S390 for 31-bit targets. However, in TARGET_D_CPU_VERSIONS depending on TARGET_ZARCH we set the CPU version to SystemZ. This is also the case if compiled for 31-bit targets leading to the following error: libphobos/libdruntime/core/sys/posix/sys/stat.d:967:13: error: static assert: '96u == 144u' is false 967 | static assert(stat_t.sizeof == 144); | ^ Thus in order to keep this patch simple I went for keeping SystemZ for 64-bit targets and S390, as usual, for 31-bit targets and dropped the distinction between ESA and z/Architecture. Bootstrapped and regtested on IBM zSystems. Ok for mainline? gcc/ChangeLog: * config/s390/s390-d.cc (s390_d_target_versions): Fix detection of CPU version. --- gcc/config/s390/s390-d.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
Comments
Excerpts from Stefan Schulze Frielinghaus's message of Januar 24, 2023 9:47 am: > In the context of D the interpretation of S390, S390X, and SystemZ is a > bit fuzzy. The wording S390X was wrongly deprecated in favour of > SystemZ by commit > https://github.com/dlang/dlang.org/commit/3b50a4c3faf01c32234d0ef8be5f82915a61c23f > Thus, SystemZ is used for 64-bit targets, now, and S390 for 31-bit > targets. However, in TARGET_D_CPU_VERSIONS depending on TARGET_ZARCH we > set the CPU version to SystemZ. This is also the case if compiled for > 31-bit targets leading to the following error: > > libphobos/libdruntime/core/sys/posix/sys/stat.d:967:13: error: static assert: '96u == 144u' is false > 967 | static assert(stat_t.sizeof == 144); > | ^ > > Thus in order to keep this patch simple I went for keeping SystemZ for > 64-bit targets and S390, as usual, for 31-bit targets and dropped the > distinction between ESA and z/Architecture. > > Bootstrapped and regtested on IBM zSystems. Ok for mainline? > OK.
On 1/24/23 09:47, Stefan Schulze Frielinghaus wrote: > In the context of D the interpretation of S390, S390X, and SystemZ is a > bit fuzzy. The wording S390X was wrongly deprecated in favour of > SystemZ by commit > https://github.com/dlang/dlang.org/commit/3b50a4c3faf01c32234d0ef8be5f82915a61c23f > Thus, SystemZ is used for 64-bit targets, now, and S390 for 31-bit > targets. However, in TARGET_D_CPU_VERSIONS depending on TARGET_ZARCH we > set the CPU version to SystemZ. This is also the case if compiled for > 31-bit targets leading to the following error: > > libphobos/libdruntime/core/sys/posix/sys/stat.d:967:13: error: static assert: '96u == 144u' is false > 967 | static assert(stat_t.sizeof == 144); > | ^ > > Thus in order to keep this patch simple I went for keeping SystemZ for > 64-bit targets and S390, as usual, for 31-bit targets and dropped the > distinction between ESA and z/Architecture. > > Bootstrapped and regtested on IBM zSystems. Ok for mainline? > > gcc/ChangeLog: > > * config/s390/s390-d.cc (s390_d_target_versions): Fix detection > of CPU version. Ok, thanks! Andreas
diff --git a/gcc/config/s390/s390-d.cc b/gcc/config/s390/s390-d.cc index d10b45f7de4..6e9c80f7283 100644 --- a/gcc/config/s390/s390-d.cc +++ b/gcc/config/s390/s390-d.cc @@ -30,10 +30,11 @@ along with GCC; see the file COPYING3. If not see void s390_d_target_versions (void) { - if (TARGET_ZARCH) - d_add_builtin_version ("SystemZ"); - else if (TARGET_64BIT) - d_add_builtin_version ("S390X"); + if (TARGET_64BIT) + { + d_add_builtin_version ("S390X"); + d_add_builtin_version ("SystemZ"); + } else d_add_builtin_version ("S390");