This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [libcxx+newlib] nexttoward{f,l,} shims for _LDBL_EQ_DBL systems
- From: Jeff Johnston <jjohnstn at redhat dot com>
- To: Jonathan Roelofs <jonathan at codesourcery dot com>
- Cc: Newlib Mailing List <newlib at sourceware dot org>
- Date: Mon, 15 Dec 2014 15:51:56 -0500 (EST)
- Subject: Re: [libcxx+newlib] nexttoward{f,l,} shims for _LDBL_EQ_DBL systems
- Authentication-results: sourceware.org; auth=none
- References: <5421D931 dot 905 at codesourcery dot com> <5487087D dot 60109 at codesourcery dot com> <360451599 dot 20515843 dot 1418163322593 dot JavaMail dot zimbra at redhat dot com> <548779F0 dot 5090308 at codesourcery dot com> <1019993084 dot 20539736 dot 1418168198498 dot JavaMail dot zimbra at redhat dot com> <54889EC2 dot 6000209 at codesourcery dot com> <CABdywOdrYKmuOx-k1GzwVF9VakYw41YYeNs74yLuk8=myS+qCA at mail dot gmail dot com> <5488BF5C dot 4040200 at codesourcery dot com>
Patch committed.
-- Jeff J.
----- Original Message -----
From: "Jonathan Roelofs" <jonathan@codesourcery.com>
To: "JF Bastien" <jfb@chromium.org>, "Jeff Johnston" <jjohnstn@redhat.com>, "Craig Howland" <howland@LGSInnovations.com>
Sent: Wednesday, December 10, 2014 4:47:08 PM
Subject: Re: [libcxx+newlib] nexttoward{f,l,} shims for _LDBL_EQ_DBL systems
Apparently patch management is hard. Here's what I meant to send.
Jon
On 12/10/14 2:43 PM, JF Bastien wrote:
> FORCE_EVAL is still in newlib/libm/common/nexttowardf.c?
>
> On Wed, Dec 10, 2014 at 11:28 AM, Jonathan Roelofs <
> jonathan@codesourcery.com> wrote:
>
>> Drop the FORCE_EVAL macro, and wrap nexttowardf in _LDBL_EQ_DBL as per
>> Craig's suggestion.
>>
>> Jon
>>
>>
>> On 12/9/14 4:36 PM, Jeff Johnston wrote:
>>
>>> ----- Original Message -----
>>>
>>>> From: "Jonathan Roelofs" <jonathan@codesourcery.com>
>>>> To: "Jeff Johnston" <jjohnstn@redhat.com>
>>>> Cc: "JF Bastien" <jfb@chromium.org>, "Craig Howland" <
>>>> howland@lgsinnovations.com>, newlib@sourceware.org
>>>> Sent: Tuesday, December 9, 2014 5:38:40 PM
>>>> Subject: Re: [libcxx+newlib] nexttoward{f,l,} shims for _LDBL_EQ_DBL
>>>> systems
>>>>
>>>>
>>>>
>>>> On 12/9/14 3:15 PM, Jeff Johnston wrote:
>>>>
>>>>> Just a couple comments.
>>>>>
>>>>> 1. The FORCE_EVAL macro looks for
>>>>> double or long double, even though it is only used for floats in
>>>>> nexttowardf
>>>>> By any chance was this macro in a header that you brought into
>>>>> the code and if so, would it not be better to put the general-purpose
>>>>> macro in local.h? Otherwise, I would just suggest removing the
>>>>> double/long
>>>>> double
>>>>> parts that are extraneous in this instance and clutter the code.
>>>>>
>>>> FORCE_EVAL did come from a header, and yeah, local.h probably is a better
>>>> place
>>>> for it.
>>>>
>>>>>
>>>>> If you took it from a header, please confirm the license was the same as
>>>>> nexttowardf() which is fine btw for inclusion into newlib.
>>>>>
>>>> That header has this at the top of it:
>>>>
>>>> * ====================================================
>>>> * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
>>>> *
>>>> * Developed at SunPro, a Sun Microsystems, Inc. business.
>>>> * Permission to use, copy, modify, and distribute this
>>>> * software is freely granted, provided that this notice
>>>> * is preserved.
>>>> * ====================================================
>>>>
>>>>
>>> In that case, just do the volatile assignment manually instead of adding a
>>> second license.
>>>
>>>
>>>>> 2. You have put the nexttowardf function prototype in the math.h section
>>>>> where
>>>>> _LDBL_EQ_DOUBLE is true but the code itself doesn't use the flag as
>>>>> it doesn't rely on long double internals.
>>>>>
>>>> Oh, right. Good point. I'll take it out of _LDBL_EQ_DOUBLE.
>>>>
>>>> Jon
>>>>
>>>>>
>>>>> -- Jeff J.
>>>>>
>>>>>
>>>> --
>>>> Jon Roelofs
>>>> jonathan@codesourcery.com
>>>> CodeSourcery / Mentor Embedded
>>>>
>>>>
>> --
>> Jon Roelofs
>> jonathan@codesourcery.com
>> CodeSourcery / Mentor Embedded
>>
>
--
Jon Roelofs
jonathan@codesourcery.com
CodeSourcery / Mentor Embedded
- References:
- [libcxx+newlib] nexttoward{f,l,} shims for _LDBL_EQ_DBL systems
- Re: [libcxx+newlib] nexttoward{f,l,} shims for _LDBL_EQ_DBL systems
- Re: [libcxx+newlib] nexttoward{f,l,} shims for _LDBL_EQ_DBL systems
- Re: [libcxx+newlib] nexttoward{f,l,} shims for _LDBL_EQ_DBL systems
- Re: [libcxx+newlib] nexttoward{f,l,} shims for _LDBL_EQ_DBL systems
- Re: [libcxx+newlib] nexttoward{f,l,} shims for _LDBL_EQ_DBL systems