diff --git a/autoconf/aclocal.m4 b/autoconf/aclocal.m4 index 4edddfe..a0bc057 100644 --- a/autoconf/aclocal.m4 +++ b/autoconf/aclocal.m4 @@ -7,7 +7,6 @@ dnl Borrowed from GNU clisp. m4_include([alloca.m4]) m4_include([as-underscore.m4]) m4_include([c++-constructors.m4]) -m4_include([fpu_control.m4]) m4_include([general.m4]) m4_include([gettimeofday.m4]) m4_include([param.m4]) dnl called intparam.m4 in clisp diff --git a/configure.ac b/configure.ac index 32325d9..f8a8fa9 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ dnl dnl AC_INIT(src/integer/gcd/cl_I_gcd.cc) AC_CONFIG_AUX_DIR(autoconf) -AC_CONFIG_HEADER(include/cln/config.h include/cln/version.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h) +AC_CONFIG_HEADER(include/cln/config.h include/cln/version.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/timing/cl_t_config.h) AC_PROG_MAKE_SET dnl This piece of sed script replaces every line containing '@subdir@' dnl by several consecutive lines, each referencing one subdir. @@ -135,8 +135,6 @@ dnl checks for functions and declarations dnl CL_ALLOCA dnl set variable ALLOCA, DEFS NO_ALLOCA -CL_FPU_CONTROL - dnl DEFS HAVE_FPU_CONTROL_T, HAVE_SETFPUCW CL_GETTIMEOFDAY dnl DEFS HAVE_GETTIMEOFDAY, GETTIMEOFDAY_DOTS, GETTIMEOFDAY_TZP_T ac_cv_func_ftime=no diff --git a/include/cln/dfloat.h b/include/cln/dfloat.h index edb8574..2e96eb3 100644 --- a/include/cln/dfloat.h +++ b/include/cln/dfloat.h @@ -309,7 +309,6 @@ inline cl_DF& operator/= (cl_DF& x, const double y) { return x = x / y; } /* */ -CL_REQUIRE(cl_ieee) // Runtime typing support. diff --git a/include/cln/ffloat.h b/include/cln/ffloat.h index 9c150bf..61417a0 100644 --- a/include/cln/ffloat.h +++ b/include/cln/ffloat.h @@ -308,7 +308,6 @@ inline cl_FF& operator/= (cl_FF& x, const cl_FF& y) { return x = x / y; } inline cl_FF& operator/= (cl_FF& x, const float y) { return x = x / y; } -CL_REQUIRE(cl_ieee) /* */ diff --git a/include/cln/float.h b/include/cln/float.h index 1ab2d3d..e262ca0 100644 --- a/include/cln/float.h +++ b/include/cln/float.h @@ -760,7 +760,6 @@ public: }; -CL_REQUIRE(cl_ieee) // If this is true, floating point underflow returns zero instead of throwing an exception. diff --git a/m4/fpu_control.m4 b/m4/fpu_control.m4 deleted file mode 100644 index b494d68..0000000 --- a/m4/fpu_control.m4 +++ /dev/null @@ -1,24 +0,0 @@ -dnl -*- Autoconf -*- -dnl Copyright (C) 1993-2003 Free Software Foundation, Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -dnl From Bruno Haible, Marcus Daniels, Sam Steingold. - -AC_PREREQ(2.57) - -AC_DEFUN([CL_FPU_CONTROL], -[dnl Check for Linux with and fpu_control_t or __setfpucw(). -dnl glibc versions since October 1998 define fpu_control_t. Earlier versions -dnl define and declare __setfpucw(). Very early Linux libc versions have none, -dnl and __fpu_control is of type `unsigned short'. -CL_COMPILE_CHECK([fpu_control_t], cl_cv_type_fpu_control_t, -[#include ], [fpu_control_t x;], -AC_DEFINE(HAVE_FPU_CONTROL_T,,[have and it defines the fpu_control_t type])) -CL_COMPILE_CHECK([__setfpucw], cl_cv_func_setfpucw, -[#include ], [__setfpucw(_FPU_IEEE);], -AC_DEFINE(HAVE_SETFPUCW,,[have and it declares the __setfpucw() function])) -]) diff --git a/src/float/base/cl_ieee.cc b/src/float/base/cl_ieee.cc deleted file mode 100644 index 73b6105..0000000 --- a/src/float/base/cl_ieee.cc +++ /dev/null @@ -1,61 +0,0 @@ -// System dependent IEEE floating-point coprocessor initialization. - -// General includes. -#include "cl_sysdep.h" - -CL_PROVIDE(cl_ieee) - -// Specification. -#include "cl_ieee.h" - - -// Implementation. - -#include "cl_FF.h" -#include "cl_DF.h" -#include "cl_float_config.h" - -#if (defined(linux) || defined(__linux)) && (defined(FAST_FLOAT) || defined(FAST_DOUBLE)) - -// Division by 0.0 should return NaN and not raise an SIGFPE. -// For this, we either have to link with -lieee or copy some -// part from libc-linux/sysdeps/linux/{i386,m68k}/ieee.c: - -#include - -#if 0 // Unfortunately this gives an error if also linked with -lieee - #if defined(HAVE_FPU_CONTROL_T) - fpu_control_t __fpu_control = _FPU_IEEE; - #else - unsigned short __fpu_control = _FPU_IEEE; - #endif -#else -AT_INITIALIZATION(ieee) -{ - #if defined(_FPU_IEEE) - #if defined(HAVE_FPU_CONTROL_T) - extern fpu_control_t __fpu_control; - __fpu_control = _FPU_IEEE; - #elif defined(HAVE_SETFPUCW) - __setfpucw(_FPU_IEEE); - #else - extern unsigned short __fpu_control; - __fpu_control = _FPU_IEEE; - #endif - #else - // Nothing to do (as on some architectures): - // probably this means that _FPU_DEFAULT is just as good as _FPU_IEEE. - #endif -} -#endif - -#endif - -namespace cln { - -// This dummy links in this module whenever some module needs IEEE floats. -int cl_ieee_module; - -} // namespace cln - -CL_PROVIDE_END(cl_ieee) diff --git a/src/float/base/cl_ieee.h b/src/float/base/cl_ieee.h deleted file mode 100644 index 0081c46..0000000 --- a/src/float/base/cl_ieee.h +++ /dev/null @@ -1,21 +0,0 @@ -// IEEE floating-point - -#ifndef _CL_IEEE_H -#define _CL_IEEE_H - -namespace cln { - -// To make sure that cl_ieee.cc is linked in. -// NEED_IEEE_FLOATS() -#if (defined(linux) || defined(__linux)) // only needed on Linux - #define NEED_IEEE_FLOATS() \ - CL_REQUIRE(cl_ieee) \ - CL_FORCE_LINK(CONCAT(cl_ieee_dummy_,__LINE__), cl_ieee_module) -#else - #define NEED_IEEE_FLOATS() -#endif -extern int cl_ieee_module; - -} // namespace cln - -#endif /* _CL_IEEE_H */ diff --git a/src/float/cl_float_config.h.in b/src/float/cl_float_config.h.in deleted file mode 100644 index bc62a1e..0000000 --- a/src/float/cl_float_config.h.in +++ /dev/null @@ -1,20 +0,0 @@ -// Defines OS dependent macros - -#ifndef _CL_FLOAT_CONFIG_H -#define _CL_FLOAT_CONFIG_H - -/* These definitions are adjusted by `configure' automatically. */ - - -/* functions and declarations */ - -/* CL_FPU_CONTROL */ -/* Define if you have and it defines the fpu_control_t type. */ -#undef HAVE_FPU_CONTROL_T -/* Define if you have and it declares the __setfpucw() - function. */ -#undef HAVE_SETFPUCW - - -#endif /* _CL_FLOAT_CONFIG_H */ - diff --git a/src/float/dfloat/elem/cl_DF_div.cc b/src/float/dfloat/elem/cl_DF_div.cc index c8211d4..d2d8ada 100644 --- a/src/float/dfloat/elem/cl_DF_div.cc +++ b/src/float/dfloat/elem/cl_DF_div.cc @@ -14,14 +14,12 @@ #include "cl_F.h" #include "cl_low.h" #include "cl_DS.h" -#include "cl_ieee.h" #include "cl_inline.h" #include "cl_DF_zerop.cc" namespace cln { -NEED_IEEE_FLOATS() const cl_DF operator/ (const cl_DF& x1, const cl_DF& x2) { diff --git a/src/float/dfloat/elem/cl_DF_minus.cc b/src/float/dfloat/elem/cl_DF_minus.cc index 5c26083..1e5447f 100644 --- a/src/float/dfloat/elem/cl_DF_minus.cc +++ b/src/float/dfloat/elem/cl_DF_minus.cc @@ -10,11 +10,9 @@ // Implementation. #include "cl_DF.h" -#include "cl_ieee.h" namespace cln { -NEED_IEEE_FLOATS() const cl_DF operator- (const cl_DF& x1, const cl_DF& x2) { diff --git a/src/float/dfloat/elem/cl_DF_mul.cc b/src/float/dfloat/elem/cl_DF_mul.cc index 762b779..050d2c5 100644 --- a/src/float/dfloat/elem/cl_DF_mul.cc +++ b/src/float/dfloat/elem/cl_DF_mul.cc @@ -13,14 +13,12 @@ #include "cl_F.h" #include "cl_low.h" #include "cl_DS.h" -#include "cl_ieee.h" #include "cl_inline.h" #include "cl_DF_zerop.cc" namespace cln { -NEED_IEEE_FLOATS() const cl_DF operator* (const cl_DF& x1, const cl_DF& x2) { diff --git a/src/float/dfloat/elem/cl_DF_plus.cc b/src/float/dfloat/elem/cl_DF_plus.cc index 90cb6ce..4b94b48 100644 --- a/src/float/dfloat/elem/cl_DF_plus.cc +++ b/src/float/dfloat/elem/cl_DF_plus.cc @@ -11,12 +11,10 @@ #include "cl_DF.h" #include "cl_F.h" -#include "cl_ieee.h" #include "cl_xmacros.h" namespace cln { -NEED_IEEE_FLOATS() const cl_DF operator+ (const cl_DF& x1, const cl_DF& x2) { diff --git a/src/float/ffloat/elem/cl_FF_div.cc b/src/float/ffloat/elem/cl_FF_div.cc index 2d90939..ac41927 100644 --- a/src/float/ffloat/elem/cl_FF_div.cc +++ b/src/float/ffloat/elem/cl_FF_div.cc @@ -13,14 +13,12 @@ #include "cl_N.h" #include "cl_F.h" #include "cl_low.h" -#include "cl_ieee.h" #include "cl_inline.h" #include "cl_FF_zerop.cc" namespace cln { -NEED_IEEE_FLOATS() const cl_FF operator/ (const cl_FF& x1, const cl_FF& x2) { diff --git a/src/float/ffloat/elem/cl_FF_minus.cc b/src/float/ffloat/elem/cl_FF_minus.cc index fbcd72d..48045d3 100644 --- a/src/float/ffloat/elem/cl_FF_minus.cc +++ b/src/float/ffloat/elem/cl_FF_minus.cc @@ -10,11 +10,9 @@ // Implementation. #include "cl_FF.h" -#include "cl_ieee.h" namespace cln { -NEED_IEEE_FLOATS() const cl_FF operator- (const cl_FF& x1, const cl_FF& x2) { diff --git a/src/float/ffloat/elem/cl_FF_mul.cc b/src/float/ffloat/elem/cl_FF_mul.cc index c258c71..7127c8b 100644 --- a/src/float/ffloat/elem/cl_FF_mul.cc +++ b/src/float/ffloat/elem/cl_FF_mul.cc @@ -12,14 +12,12 @@ #include "cl_FF.h" #include "cl_F.h" #include "cl_low.h" -#include "cl_ieee.h" #include "cl_inline.h" #include "cl_FF_zerop.cc" namespace cln { -NEED_IEEE_FLOATS() const cl_FF operator* (const cl_FF& x1, const cl_FF& x2) { diff --git a/src/float/ffloat/elem/cl_FF_plus.cc b/src/float/ffloat/elem/cl_FF_plus.cc index f84954b..7937e2a 100644 --- a/src/float/ffloat/elem/cl_FF_plus.cc +++ b/src/float/ffloat/elem/cl_FF_plus.cc @@ -11,12 +11,10 @@ #include "cl_FF.h" #include "cl_F.h" -#include "cl_ieee.h" #include "cl_xmacros.h" namespace cln { -NEED_IEEE_FLOATS() const cl_FF operator+ (const cl_FF& x1, const cl_FF& x2) {