This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb/doublest.c: Avoid calling ldfrexp if long double is double.
- From: Will Newton <will dot newton at linaro dot org>
- To: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Patch Tracking <patches at linaro dot org>
- Date: Tue, 11 Jun 2013 14:25:21 +0100
- Subject: Re: [PATCH] gdb/doublest.c: Avoid calling ldfrexp if long double is double.
- References: <51B228C9 dot 2030105 at linaro dot org> <201306072009 dot r57K9kiX009408 at glazunov dot sibelius dot xs4all dot nl>
On 7 June 2013 21:09, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> Date: Fri, 07 Jun 2013 19:39:05 +0100
>> From: Will Newton <will.newton@linaro.org>
>>
>> There's no need to call ldfrexp if long double is the same size
>> as double, the standard frexp will be faster and more accurate.
>> This fixes a failure in ldbl_308.exp on ARM, where long double
>> is the same size as double.
>>
>> gdb/ChangeLog:
>>
>> 2013-06-07 Will Newton <will.newton@linaro.org>
>>
>> * doublest.c (convert_doublest_to_floatformat): If long
>> double is the same size as double call frexp instead of
>> ldfrexp.
>> ---
>> gdb/doublest.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> Hmm, sounds like the real bug is in ldfrexp. Not sure if that is
> fixable though. How many systems are still out there that have a long
> double type, but don't have frexpl(3)?
>
> Hmm, according to
>
> <http://www.gnu.org/software/gnulib/manual/html_node/frexpl.html>
>
> there might still be a few. But that means we just have to include
> another gnulib module ;).
This sounds like a better approach than my patch. Is there a standard
set of steps to add a new gnulib module?
I tried adding frexpl to update-gnulib.sh and that seems to work, but
then all my systems are glibc-based so frexpl is present and correct
anyway.
Thanks,
--
Will Newton
Toolchain Working Group, Linaro