From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 659B03858D33 for ; Mon, 23 Jan 2023 18:45:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 659B03858D33 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 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30NIVjHB036169; Mon, 23 Jan 2023 18:45:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pp1; bh=oa8lCK/vHrGNt34JYfrue2NxEhV9xV5iaFGQ7z0lWgw=; b=K2IFuaHCGUvoGdoARpQNmQiKsspjsHPw1dTtVhDzvt3wNoLqTc5V8s5ChiJa53VbROp8 Zt/ogzfuwoSqDJk0g9M5OdNr1k6luy2rBpt49k9Rlyw1YvFZfdOmpHU7X8s5LIaJo6Ou UAXmpSqmzlkmUruQrc4tMYnJU/no9tbHQ3qU+1h6P7AV7S/G+Z+/tMntRgnkPYxUhJO3 8Sd5n9H7J+j3ToCJGXvOo5/jsvscuqcESDAB6lYIil49y87kUIkv/k/7zAbwrl9Shale hIQNRyc28HZc34xst/sCi36eN2aCYy8BUy7v6X8ae9HCiTNR9bhZv8q5/9Xh4EF0J1U7 XA== 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 3n9ykk08dw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Jan 2023 18:45:43 +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 30NIG6FS026764; Mon, 23 Jan 2023 18:45:41 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma04ams.nl.ibm.com (PPS) with ESMTPS id 3n87p6aqs7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Jan 2023 18:45:41 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30NIjb0e23265760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Jan 2023 18:45:37 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D1F22004B; Mon, 23 Jan 2023 18:45:37 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B3F6520040; Mon, 23 Jan 2023 18:45:36 +0000 (GMT) Received: from li-42a4824c-28a0-11b2-a85c-f55c0d5956ce.ibm.com (unknown [9.171.50.37]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTPS; Mon, 23 Jan 2023 18:45:36 +0000 (GMT) Date: Mon, 23 Jan 2023 19:45:36 +0100 From: Stefan Schulze Frielinghaus To: Iain Buclaw Cc: gcc-patches@gcc.gnu.org, krebbel@linux.ibm.com Subject: Re: [PATCH] IBM zSystems: Fix TARGET_D_CPU_VERSIONS Message-ID: References: <20230113175428.1771219-1-stefansf@linux.ibm.com> <1674477296.avq4a7yu1w.astroid@pulse.none> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1674477296.avq4a7yu1w.astroid@pulse.none> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 7ObBNg5T6cMS3Da54JxEtStLz-9z4SfK X-Proofpoint-ORIG-GUID: 7ObBNg5T6cMS3Da54JxEtStLz-9z4SfK 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 bulkscore=0 phishscore=0 adultscore=0 spamscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 clxscore=1011 priorityscore=1501 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301230178 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,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 List-Id: On Mon, Jan 23, 2023 at 02:21:46PM +0100, Iain Buclaw wrote: > Excerpts from Stefan Schulze Frielinghaus via Gcc-patches's message of Januar 13, 2023 6:54 pm: > > 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); > > | ^ > > > > So that I follow, there are three possible combinations? > > ESA 31-bit (S390) > ESA 64-bit (what was S390X) > z/Arch 64-bit (SystemZ) There are three combinations: - s390: 32-bit ABI and ESA mode - s390: 32-bit ABI and z/Architecture mode - s390x: 64-bit ABI and z/Architecture mode Note, depending on the CPU mode z/Architecture is supported by the 32- and 64-bit ABI whereas ESA is only supported by the 32-bit ABI. Thus, s390 always refers to the 32-bit ABI but does not fix the instructions set architecture (ESA or z/Architecture). Whereas s390x refers to the 64-bit ABI for which only z/Architecture exists. While nitpicking, typically the target is written in lower case letters, i.e., not S390X but s390x and likewise s390 instead of S390. Hope this clarifies the set of possible combinations. Let me know if anything else is unclear. > > > 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 by me. Maybe keep both S390X and SystemZ for TARGET_64BIT? There's > only ever been a binary distinction as far as I'm aware. Sounds good to me. I will come up with an updated patch. Cheers, Stefan