[PATCH] RISC-V: Support long double math

Kito Cheng kito.cheng@gmail.com
Mon Dec 4 13:47:12 GMT 2023


Hi Corinna:

Thanks for reminding me, I didn't notice that since I just grabbed
from aarch64...:P [1]

Will check with upstream FreeBSD later :)

[1] https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/machine/aarch64/machine/_fpmath.h;h=fa62ae81cf19bf5b33637c6114f84f9910d17474;hb=HEAD


On Mon, Dec 4, 2023 at 5:37 PM Corinna Vinschen <vinschen@redhat.com> wrote:
>
> Hi Kito,
>
> thanks, both patches pushed.
>
> I just wonder...
>
> On Dec  4 15:41, Kito Cheng wrote:
> > diff --git a/newlib/libc/machine/riscv/machine/_fpmath.h b/newlib/libc/machine/riscv/machine/_fpmath.h
> > new file mode 100644
> > index 000000000..fa62ae81c
> > --- /dev/null
> > +++ b/newlib/libc/machine/riscv/machine/_fpmath.h
> > @@ -0,0 +1,64 @@
> > [...]
> > +union IEEEl2bits {
> > +     long double     e;
> > +     struct {
> > +             uint64_t        manl    :64;
> > +             uint64_t        manh    :48;
> > +             uint32_t        exp     :15;
> > +             uint32_t        sign    :1;
> > +     } bits;
> > +     /* TODO andrew: Check the packing here */
>
> ...if Andrew already checked the packaging, after he pushed this
> to the FreeBSD repo in 2015 :)))
>
>
> Thanks,
> Corinna
>


More information about the Newlib mailing list