From: Joel Sherrill <[email protected]>
Hi
This patch adds i386 and x86_64 support by migrating the Cygwin
implementation in newlib/libm/machine directories. There were
some mechanical changes such as converting from C++ to C
and converting use_sse to a function since _feinitialize()
is not guaranteed to be called.
Because of the way newlib builds, the non-functional files in
libm/fenv/ are all compiled and put in the library. For this
implementation, there is only an fenv.c, so every stub implementation
and fenv.c ended up in the final libm.a. This resulted in duplicate
symbol linking errors. Rather than split the file fenv.c and forcing
all future implementations to do this, there is an fenv_stub.c which
should be symbolically linked into libm/machine/@TARGET@ as the
name of the stub file that is not to be used. This pattern should also
support target implementations which inline some of the methods
in the target <sys/fenv.h>.o
I tested this on i386-rtems5.
Cygwin will need to switch from the code in winsup/ to this.
Corinna said that will wait until someone from that community
has time.
--joel
Joel Sherrill (1):
Add i386 and x86_64 fenv support from Cygwin.
newlib/libc/machine/i386/sys/fenv.h | 1 +
newlib/libc/machine/x86_64/sys/fenv.h | 170 ++++++++++++
newlib/libm/machine/i386/Makefile.am | 2 +-
newlib/libm/machine/i386/fenv.c | 1 +
newlib/libm/machine/x86_64/Makefile.am | 18 ++
newlib/libm/machine/x86_64/fenv.c | 487 +++++++++++++++++++++++++++++++++
6 files changed, 678 insertions(+), 1 deletion(-)
create mode 120000 newlib/libc/machine/i386/sys/fenv.h
create mode 100644 newlib/libc/machine/x86_64/sys/fenv.h
create mode 120000 newlib/libm/machine/i386/fenv.c
create mode 100644 newlib/libm/machine/x86_64/Makefile.am
create mode 100644 newlib/libm/machine/x86_64/fenv.c
--
1.8.3.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.