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 0E3C03850409 for ; Thu, 14 Jan 2021 21:49:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0E3C03850409 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 10ELXd8u053610; Thu, 14 Jan 2021 16:49:06 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 362wysga98-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Jan 2021 16:49:06 -0500 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 10ELXqNo054206; Thu, 14 Jan 2021 16:49:05 -0500 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 362wysga90-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Jan 2021 16:49:05 -0500 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 10ELXNqt014559; Thu, 14 Jan 2021 21:49:04 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma04wdc.us.ibm.com with ESMTP id 35y449g701-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Jan 2021 21:49:04 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 10ELn4Sa18088354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Jan 2021 21:49:04 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D330112061; Thu, 14 Jan 2021 21:49:04 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 803BD112062; Thu, 14 Jan 2021 21:49:03 +0000 (GMT) Received: from ibm-toto.the-meissners.org (unknown [9.160.46.99]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTPS; Thu, 14 Jan 2021 21:49:03 +0000 (GMT) Date: Thu, 14 Jan 2021 16:49:01 -0500 From: Michael Meissner To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt , Peter Bergner Subject: [PATCH 2/2] PowerPC: Use __builtin_pack_ibm128 instead of __builtin_pack_longdouble. Message-ID: <20210114214901.GB14839@ibm-toto.the-meissners.org> Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt , Peter Bergner References: <20210114214620.GA13959@ibm-toto.the-meissners.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210114214620.GA13959@ibm-toto.the-meissners.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2021-01-14_08:2021-01-14, 2021-01-14 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 clxscore=1015 suspectscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 mlxscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101140124 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, BIGNUM_EMAILS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-List-Received-Date: Thu, 14 Jan 2021 21:49:08 -0000 [PATCH 2/2] PowerPC: Use __builtin_pack_ibm128 instead of __builtin_pack_longdouble. In the patch submitted on October 22nd, 2020: https://gcc.gnu.org/pipermail/gcc-patches/2020-October/556869.html https://gcc.gnu.org/pipermail/gcc-patches/2020-October/557529.html Segher suggested that rather than add #ifdef code in libgcc's ibm-ldouble.c to use __builtin_pack_ibm128 instead of __builtin_pack_longdouble, that I should instead make __ibm128 available in targets that have 128-bit IBM long double, but don't support __float128/_Float128. This patch fixes the libgcc library to use __builtin_pack_ibm128 all of the time. I have tested these patches on a little endian power9 server system and there were no regressions. I have also tested the paches on a big endian power8 server system and there were no regressions. On the big endian system, I have built both compilers with power8 being the default cpu and power5 being the default cpu. I have verified that ibm-ldouble does use the ibm128 pack built-in function. Can i check this patch into the master branch once the previous patch has been commited? libgcc/ 2021-01-13 Michael Meissner * config/rs6000/ibm-ldouble.c (pack_ldouble): Use __builtin_pack_ibm128 instead of __builtin_pack_longdouble. --- libgcc/config/rs6000/ibm-ldouble.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgcc/config/rs6000/ibm-ldouble.c b/libgcc/config/rs6000/ibm-ldouble.c index 4c13453f975..92b4b4c583d 100644 --- a/libgcc/config/rs6000/ibm-ldouble.c +++ b/libgcc/config/rs6000/ibm-ldouble.c @@ -102,9 +102,9 @@ __asm__ (".symver __gcc_qadd,_xlqadd@GCC_3.4\n\t" static inline IBM128_TYPE pack_ldouble (double dh, double dl) { -#if defined (__LONG_DOUBLE_128__) && defined (__LONG_DOUBLE_IBM128__) \ +#if defined (__LONG_DOUBLE_128__) \ && !(defined (_SOFT_FLOAT) || defined (__NO_FPRS__)) - return __builtin_pack_longdouble (dh, dl); + return __builtin_pack_ibm128 (dh, dl); #else union { -- 2.22.0 -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meissner@linux.ibm.com, phone: +1 (978) 899-4797