Re: [PATCH] libm: riscv: Reduce sqrt and sqrtf function for code size
Jeff Johnston <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <CAOox84sRN_5YtHfeGKozahFSPz8JfQJLpJQgO7qa3jiF-+27Dw@mail.gmail.com> |
Patch pushed, thanks. -- Jeff J. On Mon, May 19, 2025 at 3:04 AM Kito Cheng <[email protected]> wrote: > LGTM, thanks :) > > On Wed, May 14, 2025 at 4:57 PM Songhe Zhu <[email protected]> > wrote: > > > > From: zhusonghe <[email protected]> > > > > The merged below patch modifies the __ieee754_sqrtf and __ieee754_sqrt > functions to use a shared implementation, replacing the original fsqrt.d[s] > instruction usage. > > > > patch: > https://sourceware.org/git/?p=newlib-cygwin.git;a=commit;h=d572c4482b473d7725be0f9380d4f5d8342e4390 > > > > Signed-off-by: Songhe Zhu <[email protected]> > > --- > > newlib/libm/machine/riscv/e_sqrt.c | 1 + > > newlib/libm/machine/riscv/ef_sqrt.c | 1 + > > 2 files changed, 2 insertions(+) > > > > diff --git a/newlib/libm/machine/riscv/e_sqrt.c > b/newlib/libm/machine/riscv/e_sqrt.c > > index 0c5aaadf3..ba000d36c 100644 > > --- a/newlib/libm/machine/riscv/e_sqrt.c > > +++ b/newlib/libm/machine/riscv/e_sqrt.c > > @@ -35,6 +35,7 @@ > > > > #include <math.h> > > #include "math_config.h" > > +#include "riscv_math.h" > > > > #if defined(__RISCV_HARD_FLOAT) && __RISCV_HARD_FLOAT >= 64 > > > > diff --git a/newlib/libm/machine/riscv/ef_sqrt.c > b/newlib/libm/machine/riscv/ef_sqrt.c > > index cc41813dd..fd7ab4b41 100644 > > --- a/newlib/libm/machine/riscv/ef_sqrt.c > > +++ b/newlib/libm/machine/riscv/ef_sqrt.c > > @@ -35,6 +35,7 @@ > > > > #include <math.h> > > #include "math_config.h" > > +#include "riscv_math.h" > > > > #if defined(__RISCV_HARD_FLOAT) && __RISCV_HARD_FLOAT >= 32 > > > > -- > > 2.17.1 > > > >