From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52122 invoked by alias); 28 May 2018 21:59:11 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 52108 invoked by uid 89); 28 May 2018 21:59:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=hacks, Hx-languages-length:1643, Restrict X-HELO: mx0a-001b2d01.pphosted.com From: Tulio Magno Quites Machado Filho To: libc-alpha@sourceware.org Subject: [PATCH] powerpc64le: Fix TFtype in sqrtf128 when using -mabi=ieeelongdouble Date: Mon, 28 May 2018 21:59:00 -0000 X-TM-AS-GCONF: 00 x-cbid: 18052821-0056-0000-0000-000004586F39 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009096; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000263; SDB=6.01039068; UDB=6.00530875; IPR=6.00818196; MB=3.00021346; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-28 21:59:05 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18052821-0057-0000-0000-0000089C9281 Message-Id: <20180528215849.30199-1-tuliom@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-28_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805280261 X-SW-Source: 2018-05/txt/msg00847.txt.bz2 When building with -mlong-double-128 or -mabi=ibmlongdouble, TFtype represents the IBM 128-bit extended floating point type, while KFtype represents the IEEE 128-bit floating point type. The soft float implementation of e_sqrtf128 had to redefine TFtype and TF in order to workaround this issue. However, this behavior changes when -mabi=ieeelongdouble is used and the macros are not necessary. 2018-05-28 Tulio Magno Quites Machado Filho * sysdeps/powerpc/powerpc64le/fpu/e_sqrtf128.c [__HAVE_FLOAT128_UNLIKE_LDBL] (TFtype, TF): Restrict TFtype and TF redirection to KFtype and KF only when the default long double type is not the IEEE 128-bit floating point type. Signed-off-by: Tulio Magno Quites Machado Filho --- sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c b/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c index 0ff897bef3..1ef3d509b0 100644 --- a/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c +++ b/sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c @@ -26,9 +26,12 @@ License along with the GNU C Library; if not, see . */ -/* Unavoidable hacks since TFmode is assumed to be binary128. */ -#define TFtype KFtype -#define TF KF +/* Unavoidable hacks since TFmode is assumed to be binary128 when + -mabi=ibmlongdouble is used. */ +#if __HAVE_FLOAT128_UNLIKE_LDBL +# define TFtype KFtype +# define TF KF +#endif #include #include -- 2.14.3