This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH 0/3] Add fenv.h generic infrastructure and default implementations
- From: Joel Sherrill <joel at rtems dot org>
- To: newlib at sourceware dot org
- Cc: Joel Sherrill <joel at rtems dot org>
- Date: Wed, 31 Jul 2019 18:13:49 -0500
- Subject: [PATCH 0/3] Add fenv.h generic infrastructure and default implementations
This patch series adds generic infrastructure for fenv.h methods.
The file libc/include/fenv.h is the RISC-V one with no modifications.
The template/default libc/include/sys/fenv.h is derived from
the RISC-V but is just an arbitrary defintion of the required values.
I assumed the RISC-V implementation was correct per POSIX given
the high quality comments.
The first patch is to pick up some files which got regenerated
using the script Jeff emailed me. Not sure about those but I
included them. Note: When bootstrapping, don't forget I added
libm/fenv/Makefile.am.
Second patch is the core of the work.
Third patch is regenerated output from the files I touched.
I did test builds on sparc-rtems5 and riscv-rtems5. The sparc
got default versions of fenv methods and the riscv got its own.
When merged and the RISC-V folks are happy, I think their
specific implementation of fenv.h can be removed.
The SPU implementation has incorrect signatures. I have no
idea about that and no SPU experience.
Interested to hear comments.
Thanks.
--joel
Joel Sherrill (3):
Miscellaneous Makefile.in regenerated
Add default implementation of fenv.h and all methods
Regenerated files from fenv.h addition
newlib/libc/include/fenv.h | 42 +++
newlib/libc/include/sys/fenv.h | 47 +++
newlib/libc/machine/msp430/Makefile.in | 1 -
newlib/libc/machine/riscv/Makefile.in | 21 +-
newlib/libc/search/Makefile.in | 50 +--
newlib/libm/Makefile.am | 6 +-
newlib/libm/Makefile.in | 12 +-
newlib/libm/configure | 3 +-
newlib/libm/configure.in | 2 +-
newlib/libm/fenv/Makefile.am | 36 ++
newlib/libm/fenv/Makefile.in | 628 ++++++++++++++++++++++++++++++++
newlib/libm/fenv/fe_dfl_env.c | 32 ++
newlib/libm/fenv/feclearexcept.c | 35 ++
newlib/libm/fenv/fegetenv.c | 35 ++
newlib/libm/fenv/fegetexceptflag.c | 36 ++
newlib/libm/fenv/fegetround.c | 36 ++
newlib/libm/fenv/feholdexcept.c | 36 ++
newlib/libm/fenv/feraiseexcept.c | 36 ++
newlib/libm/fenv/fesetenv.c | 36 ++
newlib/libm/fenv/fesetexceptflag.c | 36 ++
newlib/libm/fenv/fesetround.c | 36 ++
newlib/libm/fenv/fetestexcept.c | 36 ++
newlib/libm/fenv/feupdateenv.c | 36 ++
newlib/libm/machine/aarch64/Makefile.in | 7 +-
24 files changed, 1224 insertions(+), 57 deletions(-)
create mode 100644 newlib/libc/include/fenv.h
create mode 100644 newlib/libc/include/sys/fenv.h
create mode 100644 newlib/libm/fenv/Makefile.am
create mode 100644 newlib/libm/fenv/Makefile.in
create mode 100644 newlib/libm/fenv/fe_dfl_env.c
create mode 100644 newlib/libm/fenv/feclearexcept.c
create mode 100644 newlib/libm/fenv/fegetenv.c
create mode 100644 newlib/libm/fenv/fegetexceptflag.c
create mode 100644 newlib/libm/fenv/fegetround.c
create mode 100644 newlib/libm/fenv/feholdexcept.c
create mode 100644 newlib/libm/fenv/feraiseexcept.c
create mode 100644 newlib/libm/fenv/fesetenv.c
create mode 100644 newlib/libm/fenv/fesetexceptflag.c
create mode 100644 newlib/libm/fenv/fesetround.c
create mode 100644 newlib/libm/fenv/fetestexcept.c
create mode 100644 newlib/libm/fenv/feupdateenv.c
--
1.8.3.1