From patchwork Mon May 4 22:23:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. Murphy" X-Patchwork-Id: 38913 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 0813B3851C32; Mon, 4 May 2020 22:24:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0813B3851C32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1588631043; bh=M3YE59uo8cxExd6a8oj0GhL6jQp7WnadjiCzs24dL54=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=FHEFt+0A/Au8ellWGS32qEsm/TWakir9voLbkd+HarvU2GMGH8bLA0Lv/PP3XN/je zp414xVbBO99QPye21Y46iQxzyN98pdkybaYEnbEvpd2XwD5C0XM9vNCNPrvHIPmZV 0/yZU0HylLGZ2nixdzfgvBbUDGb5v/1briajuEic= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 199B63894E52 for ; Mon, 4 May 2020 22:23:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 199B63894E52 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 044M3H0g009107 for ; Mon, 4 May 2020 18:23:58 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 30s4gua574-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 04 May 2020 18:23:58 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 044MKuwQ001846 for ; Mon, 4 May 2020 22:23:57 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma04dal.us.ibm.com with ESMTP id 30s0g6h6mq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 04 May 2020 22:23:57 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 044MNtUQ30212566 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 4 May 2020 22:23:55 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 274987805C for ; Mon, 4 May 2020 22:23:56 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C429178060 for ; Mon, 4 May 2020 22:23:55 +0000 (GMT) Received: from brokenarrow.ibmuc.com (unknown [9.85.137.49]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP for ; Mon, 4 May 2020 22:23:55 +0000 (GMT) To: libc-alpha@sourceware.org Subject: [PATCH 3/4] powerpc64le: refactor fmaf128 Date: Mon, 4 May 2020 17:23:52 -0500 Message-Id: <5c075c3c7211661595f66463f992475efbeac8c4.1588628261.git.murphyp@linux.vnet.ibm.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-05-04_11:2020-05-04, 2020-05-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 bulkscore=0 mlxscore=0 priorityscore=1501 malwarescore=0 phishscore=0 spamscore=0 impostorscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005040172 X-Spam-Status: No, score=-20.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "Paul E. Murphy via Libc-alpha" From: "Paul E. Murphy" Reply-To: "Paul E. Murphy" Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Use the compiler hint to determine if this can be inlined. This should work for any supported GCC which inlines fma. Likewise, it prepares for a more generic multiarch _Float128 implementation of libm. --- .../powerpc64/le/fpu/multiarch/s_fmaf128-power9.c | 2 +- .../powerpc64/le/fpu/multiarch/s_fmaf128-ppc64.c | 2 +- .../powerpc64/le/{power9 => }/fpu/s_fmaf128.c | 13 ++++++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) rename sysdeps/powerpc/powerpc64/le/{power9 => }/fpu/s_fmaf128.c (89%) diff --git a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-power9.c b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-power9.c index 8df77ceade..98d4107429 100644 --- a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-power9.c +++ b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-power9.c @@ -23,4 +23,4 @@ #define __fmaf128 __fmaf128_power9 -#include +#include diff --git a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-ppc64.c b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-ppc64.c index ab0c4d03a8..405e287ff3 100644 --- a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-ppc64.c +++ b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/s_fmaf128-ppc64.c @@ -23,4 +23,4 @@ #define __fmaf128 __fmaf128_ppc64 -#include +#include diff --git a/sysdeps/powerpc/powerpc64/le/power9/fpu/s_fmaf128.c b/sysdeps/powerpc/powerpc64/le/fpu/s_fmaf128.c similarity index 89% rename from sysdeps/powerpc/powerpc64/le/power9/fpu/s_fmaf128.c rename to sysdeps/powerpc/powerpc64/le/fpu/s_fmaf128.c index f02e810fb9..e0173fff4e 100644 --- a/sysdeps/powerpc/powerpc64/le/power9/fpu/s_fmaf128.c +++ b/sysdeps/powerpc/powerpc64/le/fpu/s_fmaf128.c @@ -25,12 +25,19 @@ License along with the GNU C Library; if not, see . */ +#ifdef __FP_FAST_FMAF128 +#include #include -__float128 -__fmaf128 (__float128 x, __float128 y, __float128 z) +_Float128 +__fmaf128 (_Float128 x, _Float128 y, _Float128 z) { return x * y + z; } - libm_alias_float128 (__fma, fma) + +#else + +#include + +#endif