This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PowerPC - Fix PPC64 floorl


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]