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 822C13938C29 for ; Mon, 1 Mar 2021 17:17:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 822C13938C29 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 121H3J3V107734; Mon, 1 Mar 2021 12:17:41 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 37106da7hj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 01 Mar 2021 12:17:40 -0500 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 121H3a1x108913; Mon, 1 Mar 2021 12:17:40 -0500 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 37106da7h9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 01 Mar 2021 12:17:40 -0500 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 121HGpqi024072; Mon, 1 Mar 2021 17:17:39 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma01dal.us.ibm.com with ESMTP id 37121j18t0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 01 Mar 2021 17:17:39 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 121HHbBC6816162 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 1 Mar 2021 17:17:38 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D759B13604F; Mon, 1 Mar 2021 17:17:37 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EEC3D136051; Mon, 1 Mar 2021 17:17:36 +0000 (GMT) Received: from ibm-toto.the-meissners.org (unknown [9.65.200.124]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTPS; Mon, 1 Mar 2021 17:17:36 +0000 (GMT) Date: Mon, 1 Mar 2021 12:17:34 -0500 From: Michael Meissner To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt , Peter Bergner , Joseph Myers Subject: [PATCH 1/3 V2] Fix __sprintfkf prototype in libgcc. Message-ID: <20210301171734.GA9185@ibm-toto.the-meissners.org> Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt , Peter Bergner , Joseph Myers References: <20210301171432.GA7962@ibm-toto.the-meissners.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210301171432.GA7962@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.369, 18.0.761 definitions=2021-03-01_11:2021-03-01, 2021-03-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 mlxlogscore=999 priorityscore=1501 lowpriorityscore=0 clxscore=1015 bulkscore=0 mlxscore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103010137 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_MANYTO, 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: Mon, 01 Mar 2021 17:17:46 -0000 [PATCH 1/3 V2] Fix __sprintfkf prototype in libgcc. The prototype of __sprintfkf in _sprintfkf.h did not match the function in _sprintfkf.c. This patch fixes the prototype. I also included the _sprintfkf.h file in _sprintfkf.c to make sure the prototype is correct and to eliminate a warning about declaring the function without a previous declaration. I have done bootstraps on a little endian power9 system with each of the long double variants (128-bit IBM, 128-bit IEEE, 64-bit) enabled, and there were no regressions in each of the builds with the previous version. In addition, I have built 2 cross compilers from my x86_64 system to little endian PowerPC Linux. One build enabled decimal support and one disabled the decimal support. On the build that disabled decimal support, I verified that the _Float128 <-> Decimal conversions were not built. Can I check this patch into the master branch for GCC 11? libgcc/ 2021-03-01 Michael Meissner * config/rs6000/_sprintfkf.h (__sprintfkf): Fix prototype to match the function. * config/rs6000/_sprintfkf.c: Include _sprintfkf.h. --- libgcc/config/rs6000/_sprintfkf.c | 1 + libgcc/config/rs6000/_sprintfkf.h | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libgcc/config/rs6000/_sprintfkf.c b/libgcc/config/rs6000/_sprintfkf.c index a7fdfb483c9..2d624f14e25 100644 --- a/libgcc/config/rs6000/_sprintfkf.c +++ b/libgcc/config/rs6000/_sprintfkf.c @@ -28,6 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include #include #include +#include <_sprintfkf.h> /* This function must be built with IBM 128-bit as long double, so that we can access the strfroml function if do not have an IEEE 128-bit version, and if diff --git a/libgcc/config/rs6000/_sprintfkf.h b/libgcc/config/rs6000/_sprintfkf.h index 637d104c882..de9d7137f69 100644 --- a/libgcc/config/rs6000/_sprintfkf.h +++ b/libgcc/config/rs6000/_sprintfkf.h @@ -24,5 +24,4 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* Declaration of the conversion function to IEEE 128-bit floating point from string using snprintf. */ -extern int __sprintfkf (char *restrict, const char *restrict, ...); - +extern int __sprintfkf (char *restrict, const char *restrict, _Float128); -- 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