From patchwork Fri Jan 21 20:00:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 50335 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CF7043857C76 for ; Fri, 21 Jan 2022 20:02:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF7043857C76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1642795323; bh=8obPFP1iswtzq+Fs+OOGXfBd8XRPVjWT1lHqJuy0ko4=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=toFeXTGcIUxiMySlkDNWi9htU+pcFiQ00VdBhqKoJxPCVSqEjz8XOvEtFzkz1A3m4 dkvwKdaEXLKPHWLjl7PpQQHSAKahA6AyTGH91hoeQO7OHyYZpzwubSCsSUOHGhbFg3 F/kGp30gE5zViJBCAKRnKFsa7mBEplU9D8NYYdMw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 27EC7385840D for ; Fri, 21 Jan 2022 20:00:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 27EC7385840D Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20LJmETc022101; Fri, 21 Jan 2022 20:00:54 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3dr3a4g6xv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jan 2022 20:00:54 +0000 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 20LJsesj017464; Fri, 21 Jan 2022 20:00:54 GMT Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0b-001b2d01.pphosted.com with ESMTP id 3dr3a4g6xm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jan 2022 20:00:54 +0000 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20LJqR5b018742; Fri, 21 Jan 2022 20:00:53 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma05wdc.us.ibm.com with ESMTP id 3dqj3f275h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jan 2022 20:00:53 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20LK0oto18743730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Jan 2022 20:00:50 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6C9F5AC059; Fri, 21 Jan 2022 20:00:50 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9F8F6AC064; Fri, 21 Jan 2022 20:00:49 +0000 (GMT) Received: from toto.the-meissners.org (unknown [9.77.149.10]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTPS; Fri, 21 Jan 2022 20:00:49 +0000 (GMT) Date: Fri, 21 Jan 2022 15:00:17 -0500 To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt , Peter Bergner , Will Schmidt Subject: Ping, important: [PATCH] Use system default for long double if not specified on PowerPC. Message-ID: Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt , Peter Bergner , Will Schmidt References: Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-GUID: c_s4-52-wpM1PKwLaAQ_eNAtaWZSTF-R X-Proofpoint-ORIG-GUID: CghzySQ_QuDFkYOogHfKzGba0GOWwclq X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-21_09,2022-01-21_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 suspectscore=0 spamscore=0 phishscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2201210128 X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_MANYTO, KAM_SHORT, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Michael Meissner via Gcc-patches From: Michael Meissner Reply-To: Michael Meissner Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Ping patch. https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588292.html | Date: Wed, 12 Jan 2022 13:04:19 -0500 | From: Michael Meissner | Subject: [PATCH] Use system default for long double if not specified on PowerPC. | Message-ID: I believe this patch will be very important when Linux distributions start moving to using IEEE 128-bit floating point format. Note, the patch was made before changing the .c files to .cc. Here is the patch after the renaming. [PATCH] Use system default for long double if not specified on PowerPC. If the user did not specify a default long double format, use the long double default for the build compiler for the long double default. This patch will allow compilers built on a distribution that has changed the 128-bit floating point format to use the default used on the system. I did a normal normal bootstrap and make check regression on a little endian power9 system and there were no regressions. In addition, I built a compiler where I configured the default to use IEEE 128-bit floating point for long double. I then used that compiler to build a bootstrap with this patch applied and I did not set the floating point format. I verified that the compiler built with this patch defaults long double to be IEEE 128-bit. Can I apply this patch to the trunk for GCC 12? gcc/ 2022-01-20 Michael Meissner * config/rs6000/rs6000.cc (TARGET_IEEEQUAD_DEFAULT): If the compiler used to build the current compiler defaults to IEEE 128-bit long double, make that the default for this build. --- gcc/config/rs6000/rs6000.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index 81a4ede0e8e..0a9d62b3dfd 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -91,14 +91,22 @@ explicitly redefine TARGET_IEEEQUAD and TARGET_IEEEQUAD_DEFAULT to 0, so those systems will not pick up this default. This needs to be after all of the include files, so that POWERPC_LINUX and POWERPC_FREEBSD are - properly defined. */ + properly defined. + + If we are being built by a compiler that uses IEEE 128-bit as the default + long double and no explicit long double format was selected, then also + default long double to IEEE 128-bit. */ #ifndef TARGET_IEEEQUAD_DEFAULT #if !defined (POWERPC_LINUX) && !defined (POWERPC_FREEBSD) #define TARGET_IEEEQUAD_DEFAULT 1 #else +#ifdef __LONG_DOUBLE_IEEE128__ +#define TARGET_IEEEQUAD_DEFAULT 1 +#else #define TARGET_IEEEQUAD_DEFAULT 0 #endif #endif +#endif /* Don't enable PC-relative addressing if the target does not support it. */ #ifndef PCREL_SUPPORTED_BY_OS