This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PowerPC: remove wrong truncl implementation for PowerPC64
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Wed, 08 Jan 2014 10:07:42 -0200
- Subject: Re: [PATCH] PowerPC: remove wrong truncl implementation for PowerPC64
- Authentication-results: sourceware.org; auth=none
- References: <52CC7A2A dot 3070006 at linux dot vnet dot ibm dot com> <52CC7A8F dot 6030707 at linux dot vnet dot ibm dot com>
Updated ChangeLog with bug report:
---
2014-01-08 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
[BZ #16414]
* sysdeps/powerpc/powerpc64/fpu/s_truncl.S: Remove wrong
implementation.
* sysdeps/ieee754/ldbl-128ibm/s_truncl.c: Remove bogus comment.
On 07-01-2014 20:07, Adhemerval Zanella wrote:
> I forgot to add that I'll create a bugzilla for the truncl on PPC64 and
> send a patch to add some test inputs for 2.20.
>
>
> On 07-01-2014 20:05, Adhemerval Zanella wrote:
>> While seeking why some tgammal results shows wrong signal on PPC64, I found
>> out that the assembly implementation truncl (sysdeps/powerpc/powerpc64/fpu/s_truncl.S)
>> for is in fact returning wrong results for some inputs. More specifically,
>> for number where the first double is a exact integer and the precision
>> is determined by second long double.
>>
>> Checking on implementation comments and history, I am very confident the
>> assembly implementation was based on a version before commit
>> 5c68d401698a58cf7da150d9cce769fa6679ba5f that fixes BZ#2423 (Errors in
>> long double (ldbl-128ibm) rounding functions in glibc-2.4), since
>> the implementation indeed does not handle some inputs correctly.
>>
>> By just removing the implementation and make the build select
>> sysdeps/ieee754/ldbl-128ibm/s_truncl.c instead it fixes the tgammal
>> issues.
>>
>> Tested on PPC64.
>>
>>