From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 429DB3848407 for ; Thu, 29 Apr 2021 21:42:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 429DB3848407 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13TLY696065305; Thu, 29 Apr 2021 17:42:48 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3883txsjq8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Apr 2021 17:42:48 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 13TLYORs065761; Thu, 29 Apr 2021 17:42:48 -0400 Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 3883txsjq3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Apr 2021 17:42:48 -0400 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 13TLWuYH011243; Thu, 29 Apr 2021 21:42:47 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma02wdc.us.ibm.com with ESMTP id 384aya7992-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Apr 2021 21:42:47 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 13TLgki717236462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Apr 2021 21:42:46 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 44E9BB2068; Thu, 29 Apr 2021 21:42:46 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C5DADB206A; Thu, 29 Apr 2021 21:42:45 +0000 (GMT) Received: from ibm-toto.the-meissners.org (unknown [9.160.105.177]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTPS; Thu, 29 Apr 2021 21:42:45 +0000 (GMT) Date: Thu, 29 Apr 2021 17:42:44 -0400 From: Michael Meissner To: Joseph Myers Cc: Michael Meissner , Segher Boessenkool , Peter Bergner , Bill Schmidt , gcc-patches@gcc.gnu.org, David Edelsohn Subject: Re: [PATCH] Fix PR bootstrap/100327 (_divkf3.c) on PowerPC Message-ID: <20210429214244.GA7327@ibm-toto.the-meissners.org> Mail-Followup-To: Michael Meissner , Joseph Myers , Segher Boessenkool , Peter Bergner , Bill Schmidt , gcc-patches@gcc.gnu.org, David Edelsohn References: <20210429161342.GA4837@ibm-toto.the-meissners.org> <20210429163753.GA11318@ibm-toto.the-meissners.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Proofpoint-GUID: sjkHj1BaZxAtHJ4y5v3Kt8tqblXxqVTe X-Proofpoint-ORIG-GUID: LFjK85sf0bo1dUmku2pBICFlBIFwwLfa X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-29_11:2021-04-28, 2021-04-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 impostorscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104290137 X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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, 29 Apr 2021 21:42:52 -0000 On Thu, Apr 29, 2021 at 04:48:07PM +0000, Joseph Myers wrote: > On Thu, 29 Apr 2021, Michael Meissner via Gcc-patches wrote: > > > On Thu, Apr 29, 2021 at 04:31:50PM +0000, Joseph Myers wrote: > > > On Thu, 29 Apr 2021, Michael Meissner via Gcc-patches wrote: > > > > > > > Fix PR bootstrap/100327 (_divkf3.c) on PowerPC. > > > > > > > > This patch fixes the PowerPC _divkf3.c module to use the appropriate > > > > FLT128 constants if long double is not IEEE 128-bit. > > > > > > > > I have tested this patch by doing a bootstrap on a little endian power9 > > > > system running Linux. Can I check this into the trunk? > > > > > > Why aren't the __LIBGCC_KF_* macros defined? If there's a bug in the > > > logic to define macros for all floating-point modes supported by libgcc, > > > it should be fixed there. If there's some reason that can't work, the > > > commit message needs to explain in more detail. > > > > As Richard points out, the default libgcc_floating_mode_supported_p returns > > false for these types. If you add a target hook to return true for these > > types, the c-cppbuiltin.c then aborts because there is no suffix for these > > types. There is no target hook to define strings to add new suffixes (or > > prefixes). > > Presumably the code works with the __FLT128_* macros as used in your > patch. Those should expand to constants using the f128 suffix. So there > *is* an available suffix here (f128). Why doesn't the code there, which > checks all the available _FloatN and _FloatNx types for any with the right > machine mode, find that suffix? Good point. I will submit a new patch after this message. > (The target hook indeed can't return true for modes that don't have any > corresponding suffix, e.g. IFmode. The modes for which it returns true > may need to depend on the options passed to the compiler.) Yes that is the tricky part. Due to decisions made earlier, if long double uses the IEEE 128-bit format, the _Float128/__float128 support uses TFmode and not KFmode. But I was able to build bootstrap compiler with normal IBM extended long double, and a non-bootstrap compiler with IEEE 128-bit. I will build the bootstrap IEEE 128-bit compiler shortly. -- 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