[PATCH 2/2] RISC-V: Implment finite and fpclassify
Kito Cheng
kito.cheng@sifive.com
Wed Oct 28 15:42:24 GMT 2020
Hi Keith:
Thanks for your review! I sent patches to fix those two issues :)
On Wed, Oct 28, 2020 at 2:22 AM Keith Packard <keithp@keithp.com> wrote:
> Kito Cheng <kito.cheng@sifive.com> writes:
>
> > +#if defined(__riscv_flen) && __riscv_flen >= 64
> > +#include "riscv_math.h"
> > +int finite(double x)
> > +{
> > + long fclass = _fclass_d (x);
> > + return (fclass & FCLASS_INF) == 0;
> > +}
>
> This also needs to check for FCLASS_NAN:
>
> return (class & (FCLASS_INF|FCLASS_NAN)) == 0;
>
> Same for finitef
>
> --
> -keith
>
More information about the Newlib
mailing list