[PATCH] PowerPC - Fix PPC64 floorl

Adhemerval Zanella azanella@linux.vnet.ibm.com
Tue Apr 17 18:22:00 GMT 2012


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



More information about the Libc-alpha mailing list