This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PowerPC - Fix PPC64 floorl
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Tue, 17 Apr 2012 15:21:45 -0300
- Subject: Re: [PATCH] PowerPC - Fix PPC64 floorl
- References: <4F8DA9BA.3030800@linux.vnet.ibm.com> <m2hawimeon.fsf@igel.home>
On 04/17/2012 02:49 PM, Andreas Schwab wrote:
>
>> --- 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.
>
In fact it is second one ('__builtin_fabs (xh)'), although '__builtin_fabs (x)'
will work the same way (since compiler will generate and fabs for fist fp
part of long double). Thanks for catch this.
--
Adhemerval Zanella Netto
Software Engineer
Linux Technology Center Brazil
Toolchain / GLIBC on Power Architecture
azanella@linux.vnet.ibm.com / azanella@br.ibm.com
+55 61 8642-9890