This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PowerPC - Fix PPC64 floorl
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Tue, 17 Apr 2012 19:49:28 +0200
- Subject: Re: [PATCH] PowerPC - Fix PPC64 floorl
- References: <4F8DA9BA.3030800@linux.vnet.ibm.com>
Adhemerval Zanella <azanella@linux.vnet.ibm.com> writes:
> The commit 2460d3aa21f04cdf28497683bd3e29183189f779 added some additional tests for powl intended
> to check a correction for i386/x86_64. The tests however started to trigger some issues with powl in
> PPC64. I tracked the issue an it is due the floorl assembly version for PPC64 that fails to correctly
> floor some values large than 2**52.
This is BZ#13886.
> --- a/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
> +++ b/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
> @@ -27,9 +27,13 @@ long double
> __floorl (long double x)
> {
> double xh, xl, hi, lo;
> + double two52 = 0x10000000000000LL;
>
> ldbl_unpack (x, &xh, &xl);
>
> + if (__builtin_expect(__builtin_fabs (x) < two52, 1))
__builtin_fabsl (x) or __builtin_fabs (xh)?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."