From 8f30ca23f7c7d9181fc532be00e22da67e38a0bf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 6 Jun 1996 05:23:42 +0000 Subject: Tue Jun 4 22:03:02 1996 Andreas Schwab * sysdeps/m68k/fpu/__math.h: Define long double versions of the inline functions. * sysdeps/m68k/fpu/e_asinl.c, sysdeps/m68k/fpu/e_atanl.c, sysdeps/m68k/fpu/e_acosl.c, sysdeps/m68k/fpu/e_expl.c, sysdeps/m68k/fpu/e_fmodl.c, sysdeps/m68k/fpu/e_log10l.c, sysdeps/m68k/fpu/e_logl.c, sysdeps/m68k/fpu/e_powl.c, sysdeps/m68k/fpu/e_remainderl.c, sysdeps/m68k/fpu/e_scalbl.c, sysdeps/m68k/fpu/e_sinhl.c, sysdeps/m68k/fpu/e_sqrtl.c, sysdeps/m68k/fpu/k_cosl.c, sysdeps/m68k/fpu/k_sinl.c, sysdeps/m68k/fpu/k_tanl.c, sysdeps/m68k/fpu/s_atanl.c, sysdeps/m68k/fpu/s_ceill.c, sysdeps/m68k/fpu/s_cosl.c, sysdeps/m68k/fpu/s_expm1l.c, sysdeps/m68k/fpu/s_fabsl.c, sysdeps/m68k/fpu/s_finitel.c, sysdeps/m68k/fpu/s_floorl.c, sysdeps/m68k/fpu/s_frexpl.c, sysdeps/m68k/fpu/s_ilogbl.c, sysdeps/m68k/fpu/s_isinfl.c, sysdeps/m68k/fpu/s_isnanl.c, sysdeps/m68k/fpu/s_ldexpl.c, sysdeps/m68k/fpu/s_log1pl.c, sysdeps/m68k/fpu/s_logbl.c, sysdeps/m68k/fpu/s_modfl.c, sysdeps/m68k/fpu/s_rintl.c, sysdeps/m68k/fpu/s_scalbnl.c, sysdeps/m68k/fpu/s_significandl.c, sysdeps/m68k/fpu/s_sinl.c, sysdeps/m68k/fpu/s_tanhl.c, sysdeps/m68k/fpu/s_tanl.c: New files. * sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_modf.c: Define generic functions using FUNC and float_type with appropriate defaults. * sysdeps/m68k/fpu/e_acosf.c, sysdeps/m68k/fpu/e_fmodf.c, sysdeps/m68k/fpu/k_cosf.c, sysdeps/m68k/fpu/k_sinf.c, sysdeps/m68k/fpu/k_tanf.c, sysdeps/m68k/fpu/s_atanf.c, sysdeps/m68k/fpu/s_frexpf.c, sysdeps/m68k/fpu/s_ilogbf.c, sysdeps/m68k/fpu/s_isinff.c, sysdeps/m68k/fpu/s_ldexpf.c, sysdeps/m68k/fpu/s_modff.c: Include the corresponding double versions with appropriate definitions to get float functions, instead of defining them directly. * sysdeps/m68k/fpu/acos.c: File removed. * sysdeps/m68k/fpu/asin.c: File removed. * sysdeps/m68k/fpu/atan.c: File removed. * sysdeps/m68k/fpu/atan2.c: File removed. * sysdeps/m68k/fpu/atanh.c: File removed. * sysdeps/m68k/fpu/ceil.c: File removed. * sysdeps/m68k/fpu/cos.c: File removed. * sysdeps/m68k/fpu/cosh.c: File removed. * sysdeps/m68k/fpu/drem.c: File removed. * sysdeps/m68k/fpu/exp.c: File removed. * sysdeps/m68k/fpu/expm1.c: File removed. * sysdeps/m68k/fpu/fabs.c: File removed. * sysdeps/m68k/fpu/fl.h: File removed. * sysdeps/m68k/fpu/floor.c: File removed. * sysdeps/m68k/fpu/fmod.c: File removed. * sysdeps/m68k/fpu/frexp.c: File removed. * sysdeps/m68k/fpu/isinf.c: File removed. * sysdeps/m68k/fpu/isinfl.c: File removed. * sysdeps/m68k/fpu/isnan.c: File removed. * sysdeps/m68k/fpu/isnanl.c: File removed. * sysdeps/m68k/fpu/ldexp.c: File removed. * sysdeps/m68k/fpu/log.c: File removed. * sysdeps/m68k/fpu/log10.c: File removed. * sysdeps/m68k/fpu/log1p.c: File removed. * sysdeps/m68k/fpu/logb.c: File removed. * sysdeps/m68k/fpu/pow.c: File removed. * sysdeps/m68k/fpu/rint.c: File removed. * sysdeps/m68k/fpu/sin.c: File removed. * sysdeps/m68k/fpu/sinh.c: File removed. * sysdeps/m68k/fpu/sqrt.c: File removed. * sysdeps/m68k/fpu/tan.c: File removed. * sysdeps/m68k/fpu/tanh.c: File removed. * sysdeps/unix/sysv/linux/syscalls.list: Add select (the syscall name is _newselect). * sysdeps/unix/sysv/linux/select.S: File removed. * sysdeps/unix/sysv/linux/m68k/select.S: File removed; obsolete with current kernels, generic linux version is fine. --- ChangeLog | 81 ++++++++++++++++ sysdeps/m68k/fpu/__math.h | 178 ++++++++++++++++++++++++++++++++++ sysdeps/m68k/fpu/acos.c | 32 ------ sysdeps/m68k/fpu/asin.c | 2 - sysdeps/m68k/fpu/atan.c | 2 - sysdeps/m68k/fpu/atan2.c | 71 -------------- sysdeps/m68k/fpu/atanh.c | 2 - sysdeps/m68k/fpu/ceil.c | 4 - sysdeps/m68k/fpu/cos.c | 2 - sysdeps/m68k/fpu/cosh.c | 2 - sysdeps/m68k/fpu/drem.c | 31 ------ sysdeps/m68k/fpu/e_acos.c | 7 +- sysdeps/m68k/fpu/e_acosf.c | 29 +----- sysdeps/m68k/fpu/e_asinl.c | 2 + sysdeps/m68k/fpu/e_expl.c | 2 + sysdeps/m68k/fpu/e_fmod.c | 7 +- sysdeps/m68k/fpu/e_fmodf.c | 29 +----- sysdeps/m68k/fpu/e_fmodl.c | 5 + sysdeps/m68k/fpu/e_log10l.c | 2 + sysdeps/m68k/fpu/e_logl.c | 2 + sysdeps/m68k/fpu/e_powl.c | 2 + sysdeps/m68k/fpu/e_remainderl.c | 2 + sysdeps/m68k/fpu/e_scalbl.c | 2 + sysdeps/m68k/fpu/e_sinhl.c | 2 + sysdeps/m68k/fpu/e_sqrtl.c | 2 + sysdeps/m68k/fpu/exp.c | 3 - sysdeps/m68k/fpu/expm1.c | 3 - sysdeps/m68k/fpu/fabs.c | 3 - sysdeps/m68k/fpu/fl.h | 41 -------- sysdeps/m68k/fpu/floor.c | 3 - sysdeps/m68k/fpu/fmod.c | 27 ------ sysdeps/m68k/fpu/frexp.c | 27 ------ sysdeps/m68k/fpu/isinf.c | 34 ------- sysdeps/m68k/fpu/isinfl.c | 28 ------ sysdeps/m68k/fpu/isnan.c | 4 - sysdeps/m68k/fpu/isnanl.c | 28 ------ sysdeps/m68k/fpu/k_cos.c | 15 ++- sysdeps/m68k/fpu/k_cosf.c | 29 +----- sysdeps/m68k/fpu/k_cosl.c | 3 + sysdeps/m68k/fpu/k_sin.c | 16 ++- sysdeps/m68k/fpu/k_sinf.c | 29 +----- sysdeps/m68k/fpu/k_sinl.c | 3 + sysdeps/m68k/fpu/k_tan.c | 18 +++- sysdeps/m68k/fpu/k_tanf.c | 32 +----- sysdeps/m68k/fpu/k_tanl.c | 3 + sysdeps/m68k/fpu/ldexp.c | 27 ------ sysdeps/m68k/fpu/log.c | 3 - sysdeps/m68k/fpu/log10.c | 2 - sysdeps/m68k/fpu/log1p.c | 2 - sysdeps/m68k/fpu/logb.c | 46 --------- sysdeps/m68k/fpu/pow.c | 27 ------ sysdeps/m68k/fpu/rint.c | 5 - sysdeps/m68k/fpu/s_atan.c | 7 +- sysdeps/m68k/fpu/s_atanf.c | 34 +------ sysdeps/m68k/fpu/s_atanl.c | 5 + sysdeps/m68k/fpu/s_ceill.c | 2 + sysdeps/m68k/fpu/s_cosl.c | 2 + sysdeps/m68k/fpu/s_expm1l.c | 2 + sysdeps/m68k/fpu/s_fabsl.c | 2 + sysdeps/m68k/fpu/s_finitel.c | 2 + sysdeps/m68k/fpu/s_floorl.c | 2 + sysdeps/m68k/fpu/s_frexp.c | 18 +++- sysdeps/m68k/fpu/s_frexpf.c | 30 +----- sysdeps/m68k/fpu/s_frexpl.c | 3 + sysdeps/m68k/fpu/s_ilogb.c | 16 ++- sysdeps/m68k/fpu/s_ilogbf.c | 31 +----- sysdeps/m68k/fpu/s_ilogbl.c | 3 + sysdeps/m68k/fpu/s_isinf.c | 5 +- sysdeps/m68k/fpu/s_isinff.c | 34 +------ sysdeps/m68k/fpu/s_isinfl.c | 5 + sysdeps/m68k/fpu/s_isnanl.c | 2 + sysdeps/m68k/fpu/s_ldexp.c | 7 +- sysdeps/m68k/fpu/s_ldexpf.c | 34 +------ sysdeps/m68k/fpu/s_ldexpl.c | 5 + sysdeps/m68k/fpu/s_log1pl.c | 2 + sysdeps/m68k/fpu/s_logbl.c | 2 + sysdeps/m68k/fpu/s_modf.c | 18 +++- sysdeps/m68k/fpu/s_modff.c | 30 +----- sysdeps/m68k/fpu/s_modfl.c | 3 + sysdeps/m68k/fpu/s_rintl.c | 2 + sysdeps/m68k/fpu/s_scalbnl.c | 2 + sysdeps/m68k/fpu/s_significandl.c | 2 + sysdeps/m68k/fpu/s_sinl.c | 2 + sysdeps/m68k/fpu/s_tanhl.c | 2 + sysdeps/m68k/fpu/s_tanl.c | 2 + sysdeps/m68k/fpu/sin.c | 2 - sysdeps/m68k/fpu/sinh.c | 2 - sysdeps/m68k/fpu/sqrt.c | 2 - sysdeps/m68k/fpu/tan.c | 2 - sysdeps/m68k/fpu/tanh.c | 2 - sysdeps/unix/sysv/linux/m68k/select.S | 53 ---------- sysdeps/unix/sysv/linux/select.S | 31 ------ sysdeps/unix/sysv/linux/syscalls.list | 1 + 93 files changed, 478 insertions(+), 898 deletions(-) delete mode 100644 sysdeps/m68k/fpu/acos.c delete mode 100644 sysdeps/m68k/fpu/asin.c delete mode 100644 sysdeps/m68k/fpu/atan.c delete mode 100644 sysdeps/m68k/fpu/atan2.c delete mode 100644 sysdeps/m68k/fpu/atanh.c delete mode 100644 sysdeps/m68k/fpu/ceil.c delete mode 100644 sysdeps/m68k/fpu/cos.c delete mode 100644 sysdeps/m68k/fpu/cosh.c delete mode 100644 sysdeps/m68k/fpu/drem.c create mode 100644 sysdeps/m68k/fpu/e_asinl.c create mode 100644 sysdeps/m68k/fpu/e_expl.c create mode 100644 sysdeps/m68k/fpu/e_fmodl.c create mode 100644 sysdeps/m68k/fpu/e_log10l.c create mode 100644 sysdeps/m68k/fpu/e_logl.c create mode 100644 sysdeps/m68k/fpu/e_powl.c create mode 100644 sysdeps/m68k/fpu/e_remainderl.c create mode 100644 sysdeps/m68k/fpu/e_scalbl.c create mode 100644 sysdeps/m68k/fpu/e_sinhl.c create mode 100644 sysdeps/m68k/fpu/e_sqrtl.c delete mode 100644 sysdeps/m68k/fpu/exp.c delete mode 100644 sysdeps/m68k/fpu/expm1.c delete mode 100644 sysdeps/m68k/fpu/fabs.c delete mode 100644 sysdeps/m68k/fpu/fl.h delete mode 100644 sysdeps/m68k/fpu/floor.c delete mode 100644 sysdeps/m68k/fpu/fmod.c delete mode 100644 sysdeps/m68k/fpu/frexp.c delete mode 100644 sysdeps/m68k/fpu/isinf.c delete mode 100644 sysdeps/m68k/fpu/isinfl.c delete mode 100644 sysdeps/m68k/fpu/isnan.c delete mode 100644 sysdeps/m68k/fpu/isnanl.c create mode 100644 sysdeps/m68k/fpu/k_cosl.c create mode 100644 sysdeps/m68k/fpu/k_sinl.c create mode 100644 sysdeps/m68k/fpu/k_tanl.c delete mode 100644 sysdeps/m68k/fpu/ldexp.c delete mode 100644 sysdeps/m68k/fpu/log.c delete mode 100644 sysdeps/m68k/fpu/log10.c delete mode 100644 sysdeps/m68k/fpu/log1p.c delete mode 100644 sysdeps/m68k/fpu/logb.c delete mode 100644 sysdeps/m68k/fpu/pow.c delete mode 100644 sysdeps/m68k/fpu/rint.c create mode 100644 sysdeps/m68k/fpu/s_atanl.c create mode 100644 sysdeps/m68k/fpu/s_ceill.c create mode 100644 sysdeps/m68k/fpu/s_cosl.c create mode 100644 sysdeps/m68k/fpu/s_expm1l.c create mode 100644 sysdeps/m68k/fpu/s_fabsl.c create mode 100644 sysdeps/m68k/fpu/s_finitel.c create mode 100644 sysdeps/m68k/fpu/s_floorl.c create mode 100644 sysdeps/m68k/fpu/s_frexpl.c create mode 100644 sysdeps/m68k/fpu/s_ilogbl.c create mode 100644 sysdeps/m68k/fpu/s_isinfl.c create mode 100644 sysdeps/m68k/fpu/s_isnanl.c create mode 100644 sysdeps/m68k/fpu/s_ldexpl.c create mode 100644 sysdeps/m68k/fpu/s_log1pl.c create mode 100644 sysdeps/m68k/fpu/s_logbl.c create mode 100644 sysdeps/m68k/fpu/s_modfl.c create mode 100644 sysdeps/m68k/fpu/s_rintl.c create mode 100644 sysdeps/m68k/fpu/s_scalbnl.c create mode 100644 sysdeps/m68k/fpu/s_significandl.c create mode 100644 sysdeps/m68k/fpu/s_sinl.c create mode 100644 sysdeps/m68k/fpu/s_tanhl.c create mode 100644 sysdeps/m68k/fpu/s_tanl.c delete mode 100644 sysdeps/m68k/fpu/sin.c delete mode 100644 sysdeps/m68k/fpu/sinh.c delete mode 100644 sysdeps/m68k/fpu/sqrt.c delete mode 100644 sysdeps/m68k/fpu/tan.c delete mode 100644 sysdeps/m68k/fpu/tanh.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/select.S delete mode 100644 sysdeps/unix/sysv/linux/select.S diff --git a/ChangeLog b/ChangeLog index 5fc091b568..b482e8cc92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,86 @@ +Tue Jun 4 22:03:02 1996 Andreas Schwab + + * sysdeps/m68k/fpu/__math.h: Define long double versions of + the inline functions. + + * sysdeps/m68k/fpu/e_asinl.c, sysdeps/m68k/fpu/e_atanl.c, + sysdeps/m68k/fpu/e_acosl.c, sysdeps/m68k/fpu/e_expl.c, + sysdeps/m68k/fpu/e_fmodl.c, sysdeps/m68k/fpu/e_log10l.c, + sysdeps/m68k/fpu/e_logl.c, sysdeps/m68k/fpu/e_powl.c, + sysdeps/m68k/fpu/e_remainderl.c, sysdeps/m68k/fpu/e_scalbl.c, + sysdeps/m68k/fpu/e_sinhl.c, sysdeps/m68k/fpu/e_sqrtl.c, + sysdeps/m68k/fpu/k_cosl.c, sysdeps/m68k/fpu/k_sinl.c, + sysdeps/m68k/fpu/k_tanl.c, sysdeps/m68k/fpu/s_atanl.c, + sysdeps/m68k/fpu/s_ceill.c, sysdeps/m68k/fpu/s_cosl.c, + sysdeps/m68k/fpu/s_expm1l.c, sysdeps/m68k/fpu/s_fabsl.c, + sysdeps/m68k/fpu/s_finitel.c, sysdeps/m68k/fpu/s_floorl.c, + sysdeps/m68k/fpu/s_frexpl.c, sysdeps/m68k/fpu/s_ilogbl.c, + sysdeps/m68k/fpu/s_isinfl.c, sysdeps/m68k/fpu/s_isnanl.c, + sysdeps/m68k/fpu/s_ldexpl.c, sysdeps/m68k/fpu/s_log1pl.c, + sysdeps/m68k/fpu/s_logbl.c, sysdeps/m68k/fpu/s_modfl.c, + sysdeps/m68k/fpu/s_rintl.c, sysdeps/m68k/fpu/s_scalbnl.c, + sysdeps/m68k/fpu/s_significandl.c, sysdeps/m68k/fpu/s_sinl.c, + sysdeps/m68k/fpu/s_tanhl.c, sysdeps/m68k/fpu/s_tanl.c: New files. + + * sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_fmod.c, + sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_sin.c, + sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/s_atan.c, + sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_ilogb.c, + sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_ldexp.c, + sysdeps/m68k/fpu/s_modf.c: Define generic functions using FUNC and + float_type with appropriate defaults. + + * sysdeps/m68k/fpu/e_acosf.c, sysdeps/m68k/fpu/e_fmodf.c, + sysdeps/m68k/fpu/k_cosf.c, sysdeps/m68k/fpu/k_sinf.c, + sysdeps/m68k/fpu/k_tanf.c, sysdeps/m68k/fpu/s_atanf.c, + sysdeps/m68k/fpu/s_frexpf.c, sysdeps/m68k/fpu/s_ilogbf.c, + sysdeps/m68k/fpu/s_isinff.c, sysdeps/m68k/fpu/s_ldexpf.c, + sysdeps/m68k/fpu/s_modff.c: Include the corresponding double + versions with appropriate definitions to get float functions, + instead of defining them directly. + + * sysdeps/m68k/fpu/acos.c: File removed. + * sysdeps/m68k/fpu/asin.c: File removed. + * sysdeps/m68k/fpu/atan.c: File removed. + * sysdeps/m68k/fpu/atan2.c: File removed. + * sysdeps/m68k/fpu/atanh.c: File removed. + * sysdeps/m68k/fpu/ceil.c: File removed. + * sysdeps/m68k/fpu/cos.c: File removed. + * sysdeps/m68k/fpu/cosh.c: File removed. + * sysdeps/m68k/fpu/drem.c: File removed. + * sysdeps/m68k/fpu/exp.c: File removed. + * sysdeps/m68k/fpu/expm1.c: File removed. + * sysdeps/m68k/fpu/fabs.c: File removed. + * sysdeps/m68k/fpu/fl.h: File removed. + * sysdeps/m68k/fpu/floor.c: File removed. + * sysdeps/m68k/fpu/fmod.c: File removed. + * sysdeps/m68k/fpu/frexp.c: File removed. + * sysdeps/m68k/fpu/isinf.c: File removed. + * sysdeps/m68k/fpu/isinfl.c: File removed. + * sysdeps/m68k/fpu/isnan.c: File removed. + * sysdeps/m68k/fpu/isnanl.c: File removed. + * sysdeps/m68k/fpu/ldexp.c: File removed. + * sysdeps/m68k/fpu/log.c: File removed. + * sysdeps/m68k/fpu/log10.c: File removed. + * sysdeps/m68k/fpu/log1p.c: File removed. + * sysdeps/m68k/fpu/logb.c: File removed. + * sysdeps/m68k/fpu/pow.c: File removed. + * sysdeps/m68k/fpu/rint.c: File removed. + * sysdeps/m68k/fpu/sin.c: File removed. + * sysdeps/m68k/fpu/sinh.c: File removed. + * sysdeps/m68k/fpu/sqrt.c: File removed. + * sysdeps/m68k/fpu/tan.c: File removed. + * sysdeps/m68k/fpu/tanh.c: File removed. + Thu Jun 6 00:02:15 1996 Roland McGrath + * sysdeps/unix/sysv/linux/syscalls.list: Add select (the syscall name + is _newselect). + * sysdeps/unix/sysv/linux/select.S: File removed. + + * sysdeps/unix/sysv/linux/m68k/select.S: File removed; obsolete with + current kernels, generic linux version is fine. + * locale/Makefile: Add vpath for %.gperf to programs. * Make-dist (+tsrcs): Variable removed. diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h index f59c168e79..2cbb4ca388 100644 --- a/sysdeps/m68k/fpu/__math.h +++ b/sysdeps/m68k/fpu/__math.h @@ -54,6 +54,14 @@ Cambridge, MA 02139, USA. */ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ return __result; \ } + +#define __inline_mathopl(func, op) \ + __m81_defun (long double, func, (long double __mathop_x)) \ + { \ + long double __result; \ + __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ + return __result; \ + } /* ieee style elementary functions */ __inline_mathop(__ieee754_acos, acos) @@ -77,6 +85,17 @@ __inline_mathopf(__ieee754_logf, logn) __inline_mathopf(__ieee754_sqrtf, sqrt) __inline_mathopf(__ieee754_atanhf, atan) +/* ieee style elementary long double functions */ +__inline_mathopl(__ieee754_acosl, acos) +__inline_mathopl(__ieee754_asinl, asin) +__inline_mathopl(__ieee754_coshl, cosh) +__inline_mathopl(__ieee754_sinhl, sinh) +__inline_mathopl(__ieee754_expl, etox) +__inline_mathopl(__ieee754_log10l, log10) +__inline_mathopl(__ieee754_logl, logn) +__inline_mathopl(__ieee754_sqrtl, sqrt) +__inline_mathopl(__ieee754_atanhl, atan) + __inline_mathop(__atan, atan) __inline_mathop(__cos, cos) __inline_mathop(__sin, sin) @@ -105,6 +124,20 @@ __inline_mathopf(__log1pf, lognp1) __inline_mathopf(__logbf, log2) __inline_mathopf(__significandf, getman) +__inline_mathopl(__atanl, atan) +__inline_mathopl(__cosl, cos) +__inline_mathopl(__sinl, sin) +__inline_mathopl(__tanl, tan) +__inline_mathopl(__tanhl, tanh) +__inline_mathopl(__fabsl, abs) +__inline_mathopl(__sqrtl, sqrt) + +__inline_mathopl(__rintl, int) +__inline_mathopl(__expm1l, etoxm1) +__inline_mathopl(__log1pl, lognp1) +__inline_mathopl(__logbl, log2) +__inline_mathopl(__significandl, getman) + __m81_defun (double, __ieee754_remainder, (double __x, double __y)) { double __result; @@ -427,6 +460,119 @@ __m81_defun (float, __scalbnf, (float __x, int __n)) return __result; } +__m81_defun (long double, __ieee754_remainderl, (long double __x, + long double __y)) +{ + long double __result; + __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +__m81_defun (long double, __ldexpl, (long double __x, int __e)) +{ + long double __result; + long double __float_e = (long double) __e; + __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_e), "0" (__x)); + return __result; +} + +__m81_defun (long double, __ieee754_fmodl, (long double __x, long double __y)) +{ + long double __result; + __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); + return __result; +} + +__m81_inline long double +__m81_u(__frexpl)(long double __value, int *__expptr) +{ + long double __mantissa, __exponent; + __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); + __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value)); + *__expptr = (int) __exponent; + return __mantissa; +} + +__m81_defun (long double, __floorl, (long double __x)) +{ + long double __result; + unsigned long int __ctrl_reg; + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); + /* Set rounding towards negative infinity. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); + /* Convert X to an integer, using -Inf rounding. */ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); + /* Restore the previous rounding mode. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" (__ctrl_reg)); + return __result; +} + +__m81_defun (long double, __ieee754_powl, (long double __x, long double __y)) +{ + long double __result; + if (__x == 0.0l) + { + if (__y <= 0.0l) + __result = 0.0l / 0.0l; + else + __result = 0.0l; + } + else if (__y == 0.0l || __x == 1.0l) + __result = 1.0; + else if (__y == 1.0l) + __result = __x; + else if (__y == 2.0l) + __result = __x * __x; + else if (__x == 10.0l) + __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y)); + else if (__x == 2.0l) + __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); + else if (__x < 0.0l) + { + long double __temp = __m81_u(__rintl)(__y); + if (__y == __temp) + { + int i = (int) __y; + __result + = __m81_u(__ieee754_expl)(__y * __m81_u(__ieee754_logl)(-__x)); + if (i & 1) + __result = -__result; + } + else + __result = 0.0l / 0.0l; + } + else + __result = __m81_u(__ieee754_expl)(__y * __m81_u(__ieee754_logl)(__x)); + return __result; +} + +__m81_defun (long double, __ceill, (long double __x)) +{ + long double __result; + unsigned long int __ctrl_reg; + __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); + /* Set rounding towards positive infinity. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" (__ctrl_reg | 0x30)); + /* Convert X to an integer, using +Inf rounding. */ + __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); + /* Restore the previous rounding mode. */ + __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ + : "dmi" (__ctrl_reg)); + return __result; +} + +__m81_inline long double +__m81_u(__modfl)(long double __value, long double *__iptr) +{ + long double __modf_int; + __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value)); + *__iptr = __modf_int; + return __value - __modf_int; +} + __m81_defun (int, __isinfl, (long double __value)) { /* There is no branch-condition for infinity, @@ -445,4 +591,36 @@ __m81_defun (int, __isnanl, (long double __value)) return __result; } +__m81_defun (int, __finitel, (long double __value)) +{ + /* There is no branch-condition for infinity, so we must extract and + examine the condition codes manually. */ + unsigned long int __fpsr; + __asm ("ftst%.x %1\n" + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); + return (__fpsr & (3 << 24)) == 0; +} + +__m81_defun (int, __ilogbl, (long double __x)) +{ + long double __result; + __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); + return (int) __result; +} + +__m81_defun (long double, __ieee754_scalbl, (long double __x, long double __n)) +{ + long double __result; + __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); + return __result; +} + +__m81_defun (long double, __scalbnl, (long double __x, int __n)) +{ + long double __result; + long double __float_n = (long double) __n; + __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_n), "0" (__x)); + return __result; +} + #endif /* GCC. */ diff --git a/sysdeps/m68k/fpu/acos.c b/sysdeps/m68k/fpu/acos.c deleted file mode 100644 index 1481ce2cd9..0000000000 --- a/sysdeps/m68k/fpu/acos.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1991, 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -#ifndef FUNC -#define FUNC acos -#endif - - -double -DEFUN(FUNC, (x), double x) -{ - return __m81_u(FUNC)(x); -} diff --git a/sysdeps/m68k/fpu/asin.c b/sysdeps/m68k/fpu/asin.c deleted file mode 100644 index 0e3e58f697..0000000000 --- a/sysdeps/m68k/fpu/asin.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC asin -#include diff --git a/sysdeps/m68k/fpu/atan.c b/sysdeps/m68k/fpu/atan.c deleted file mode 100644 index b9d428e170..0000000000 --- a/sysdeps/m68k/fpu/atan.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC atan -#include diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c deleted file mode 100644 index 753b7f04af..0000000000 --- a/sysdeps/m68k/fpu/atan2.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -#ifdef __GNUC__ - -double -DEFUN(atan2, (y, x), double y AND double x) -{ - static CONST double one = 1.0, zero = 0.0; - double signx, signy; - double pi, PIo4, PIo2; - - if (__isnan(x)) - return x; - if (__isnan(y)) - return y; - - signy = __copysign(one, y); - signx = __copysign(one, x); - - asm("fmovecr%.x %1, %0" : "=f" (pi) : "i" (0)); - PIo2 = pi / 2; - PIo4 = pi / 4; - - if (y == zero) - return signx == one ? y : __copysign(pi, signy); - - if (x == zero) - return __copysign(PIo2, signy); - - if (__isinf(x)) - { - if (__isinf(y)) - return __copysign(signx == one ? PIo4 : 3 * PIo4, signy); - else - return __copysign(signx == one ? zero : pi, signy); - } - - if (__isinf(y)) - return __copysign(PIo2, signy); - - y = fabs(y); - - if (x < 0.0) - /* X is negative. */ - return __copysign(pi - atan(y / -x), signy); - - return __copysign(atan(y / x), signy); -} - -#else -#include -#endif diff --git a/sysdeps/m68k/fpu/atanh.c b/sysdeps/m68k/fpu/atanh.c deleted file mode 100644 index d4636ec035..0000000000 --- a/sysdeps/m68k/fpu/atanh.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC atanh -#include diff --git a/sysdeps/m68k/fpu/ceil.c b/sysdeps/m68k/fpu/ceil.c deleted file mode 100644 index b4605e1b29..0000000000 --- a/sysdeps/m68k/fpu/ceil.c +++ /dev/null @@ -1,4 +0,0 @@ - -#define FUNC ceil - -#include diff --git a/sysdeps/m68k/fpu/cos.c b/sysdeps/m68k/fpu/cos.c deleted file mode 100644 index fa50130af7..0000000000 --- a/sysdeps/m68k/fpu/cos.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC cos -#include diff --git a/sysdeps/m68k/fpu/cosh.c b/sysdeps/m68k/fpu/cosh.c deleted file mode 100644 index 78a81943c6..0000000000 --- a/sysdeps/m68k/fpu/cosh.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC cosh -#include diff --git a/sysdeps/m68k/fpu/drem.c b/sysdeps/m68k/fpu/drem.c deleted file mode 100644 index 16caacfd81..0000000000 --- a/sysdeps/m68k/fpu/drem.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -#undef drem - -double -DEFUN(__drem, (x, y), double x AND double y) -{ - return ____drem(x, y); -} - -weak_alias (__drem, drem) diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c index 34dfc82cff..ae77dabf98 100644 --- a/sysdeps/m68k/fpu/e_acos.c +++ b/sysdeps/m68k/fpu/e_acos.c @@ -22,9 +22,12 @@ Cambridge, MA 02139, USA. */ #ifndef FUNC #define FUNC __ieee754_acos #endif +#ifndef float_type +#define float_type double +#endif -double -DEFUN(FUNC, (x), double x) +float_type +DEFUN(FUNC, (x), float_type x) { return __m81_u(FUNC)(x); } diff --git a/sysdeps/m68k/fpu/e_acosf.c b/sysdeps/m68k/fpu/e_acosf.c index 34da7ee163..90665082d3 100644 --- a/sysdeps/m68k/fpu/e_acosf.c +++ b/sysdeps/m68k/fpu/e_acosf.c @@ -1,30 +1,5 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - #ifndef FUNC #define FUNC __ieee754_acosf #endif - -float -DEFUN(FUNC, (x), float x) -{ - return __m81_u(FUNC)(x); -} +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/e_asinl.c b/sysdeps/m68k/fpu/e_asinl.c new file mode 100644 index 0000000000..0dd89fb9da --- /dev/null +++ b/sysdeps/m68k/fpu/e_asinl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_asinl +#include diff --git a/sysdeps/m68k/fpu/e_expl.c b/sysdeps/m68k/fpu/e_expl.c new file mode 100644 index 0000000000..8805a1b83a --- /dev/null +++ b/sysdeps/m68k/fpu/e_expl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_expl +#include diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c index 578fa3ce53..0b2468c06d 100644 --- a/sysdeps/m68k/fpu/e_fmod.c +++ b/sysdeps/m68k/fpu/e_fmod.c @@ -22,9 +22,12 @@ Cambridge, MA 02139, USA. */ #ifndef FUNC #define FUNC __ieee754_fmod #endif +#ifndef float_type +#define float_type double +#endif -double -DEFUN(FUNC, (x, y), double x AND double y) +float_type +DEFUN(FUNC, (x, y), float_type x AND float_type y) { return __m81_u(FUNC)(x, y); } diff --git a/sysdeps/m68k/fpu/e_fmodf.c b/sysdeps/m68k/fpu/e_fmodf.c index b3c3eadddf..88c350ce9e 100644 --- a/sysdeps/m68k/fpu/e_fmodf.c +++ b/sysdeps/m68k/fpu/e_fmodf.c @@ -1,30 +1,5 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - #ifndef FUNC #define FUNC __ieee754_fmodf #endif - -float -DEFUN(FUNC, (x, y), float x AND float y) -{ - return __m81_u(FUNC)(x, y); -} +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/e_fmodl.c b/sysdeps/m68k/fpu/e_fmodl.c new file mode 100644 index 0000000000..a46f19ea9d --- /dev/null +++ b/sysdeps/m68k/fpu/e_fmodl.c @@ -0,0 +1,5 @@ +#ifndef FUNC +#define FUNC __ieee754_fmodl +#endif +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/e_log10l.c b/sysdeps/m68k/fpu/e_log10l.c new file mode 100644 index 0000000000..6dcfc5a101 --- /dev/null +++ b/sysdeps/m68k/fpu/e_log10l.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_log10l +#include diff --git a/sysdeps/m68k/fpu/e_logl.c b/sysdeps/m68k/fpu/e_logl.c new file mode 100644 index 0000000000..03b1830759 --- /dev/null +++ b/sysdeps/m68k/fpu/e_logl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_logl +#include diff --git a/sysdeps/m68k/fpu/e_powl.c b/sysdeps/m68k/fpu/e_powl.c new file mode 100644 index 0000000000..0feec54fec --- /dev/null +++ b/sysdeps/m68k/fpu/e_powl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_powl +#include diff --git a/sysdeps/m68k/fpu/e_remainderl.c b/sysdeps/m68k/fpu/e_remainderl.c new file mode 100644 index 0000000000..b9dc540cc5 --- /dev/null +++ b/sysdeps/m68k/fpu/e_remainderl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_remainderl +#include diff --git a/sysdeps/m68k/fpu/e_scalbl.c b/sysdeps/m68k/fpu/e_scalbl.c new file mode 100644 index 0000000000..92ab7a4ad1 --- /dev/null +++ b/sysdeps/m68k/fpu/e_scalbl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_scalbl +#include diff --git a/sysdeps/m68k/fpu/e_sinhl.c b/sysdeps/m68k/fpu/e_sinhl.c new file mode 100644 index 0000000000..2f42d96a38 --- /dev/null +++ b/sysdeps/m68k/fpu/e_sinhl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_sinhl +#include diff --git a/sysdeps/m68k/fpu/e_sqrtl.c b/sysdeps/m68k/fpu/e_sqrtl.c new file mode 100644 index 0000000000..fede1024a2 --- /dev/null +++ b/sysdeps/m68k/fpu/e_sqrtl.c @@ -0,0 +1,2 @@ +#define FUNC __ieee754_sqrtl +#include diff --git a/sysdeps/m68k/fpu/exp.c b/sysdeps/m68k/fpu/exp.c deleted file mode 100644 index 2649d72143..0000000000 --- a/sysdeps/m68k/fpu/exp.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC exp -#define OP etox -#include diff --git a/sysdeps/m68k/fpu/expm1.c b/sysdeps/m68k/fpu/expm1.c deleted file mode 100644 index 19f1802e56..0000000000 --- a/sysdeps/m68k/fpu/expm1.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC __expm1 -#define OP expm1 -#include diff --git a/sysdeps/m68k/fpu/fabs.c b/sysdeps/m68k/fpu/fabs.c deleted file mode 100644 index f9538a599c..0000000000 --- a/sysdeps/m68k/fpu/fabs.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC fabs -#define OP abs -#include diff --git a/sysdeps/m68k/fpu/fl.h b/sysdeps/m68k/fpu/fl.h deleted file mode 100644 index 098e880601..0000000000 --- a/sysdeps/m68k/fpu/fl.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Floating-point constants for the 68881. - Copyright (C) 1992 Free Software Foundation, Inc. */ - -/* IGNORE($ This is used internally in the library. */ -#include -/* ansidecl.m4 here inserts the ieee file. Kludge o rama. - $) ENDCOMMENT INCLUDE($sysdeps/ieee754/fl.h$) STARTCOMMENT */ - -#ifndef __need_HUGE_VAL - -#ifdef __GNUC__ - -#undef FLT_ROUNDS - -/* Interrogate the 68881 to find the current rounding mode. */ - -static __const __inline int -DEFUN_VOID(__flt_rounds) -{ - unsigned long int __fpcr; - __asm("fmove%.l fpcr, %0" : "=g" (__fpcr)); - switch (__fpcr & (1 | 2)) - { - case 0: - return _FLT_ROUNDS_TONEAREST; - case 1: - return _FLT_ROUNDS_TOZERO; - case 2: - return _FLT_ROUNDS_TONEGINF; - case 3: - return _FLT_ROUNDS_TOPOSINF; - default: - return _FLT_ROUNDS_INDETERMINATE; - } -} - -#define FLT_ROUNDS (__flt_rounds()) - -#endif /* GCC. */ - -#endif /* Don't need HUGE_VAL. */ diff --git a/sysdeps/m68k/fpu/floor.c b/sysdeps/m68k/fpu/floor.c deleted file mode 100644 index 92a2ca68bb..0000000000 --- a/sysdeps/m68k/fpu/floor.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC floor -#define OP intrz -#include diff --git a/sysdeps/m68k/fpu/fmod.c b/sysdeps/m68k/fpu/fmod.c deleted file mode 100644 index e3a2de0689..0000000000 --- a/sysdeps/m68k/fpu/fmod.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1991, 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -double -DEFUN(fmod, (x, y), double x AND double y) -{ - return __fmod(x, y); -} diff --git a/sysdeps/m68k/fpu/frexp.c b/sysdeps/m68k/fpu/frexp.c deleted file mode 100644 index de74851de9..0000000000 --- a/sysdeps/m68k/fpu/frexp.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -double -DEFUN(frexp, (value, expptr), double value AND int *expptr) -{ - return __frexp(value, expptr); -} diff --git a/sysdeps/m68k/fpu/isinf.c b/sysdeps/m68k/fpu/isinf.c deleted file mode 100644 index ab2cf0bb03..0000000000 --- a/sysdeps/m68k/fpu/isinf.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -#ifndef FUNC -#define FUNC __isinf -#endif - - -int -DEFUN(FUNC, (x), double x) -{ - return __m81_u(FUNC)(x); -} - -weak_alias (__isinf, isinf) diff --git a/sysdeps/m68k/fpu/isinfl.c b/sysdeps/m68k/fpu/isinfl.c deleted file mode 100644 index 97b5983d0f..0000000000 --- a/sysdeps/m68k/fpu/isinfl.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -int -DEFUN(__isinfl, (x), long double x) -{ - return __m81_u(__isinfl)(x); -} - -weak_alias (__isinfl, isinfl) diff --git a/sysdeps/m68k/fpu/isnan.c b/sysdeps/m68k/fpu/isnan.c deleted file mode 100644 index d0984911d2..0000000000 --- a/sysdeps/m68k/fpu/isnan.c +++ /dev/null @@ -1,4 +0,0 @@ -#define FUNC __isnan -#include - -weak_alias (__isnan, isnan) diff --git a/sysdeps/m68k/fpu/isnanl.c b/sysdeps/m68k/fpu/isnanl.c deleted file mode 100644 index e5e3db2171..0000000000 --- a/sysdeps/m68k/fpu/isnanl.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -int -DEFUN(__isnanl, (x), long double x) -{ - return __m81_u(__isnanl)(x); -} - -weak_alias (__isnanl, isnanl) diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c index 1f508b4f40..28406e8cba 100644 --- a/sysdeps/m68k/fpu/k_cos.c +++ b/sysdeps/m68k/fpu/k_cos.c @@ -19,8 +19,17 @@ Cambridge, MA 02139, USA. */ #include #include -double -DEFUN(__kernel_cos, (x, y), double x AND double y) +#ifndef FUNC +#define FUNC cos +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float_type +DEFUN(__CONCATX(__kernel_,FUNC), (x, y), float_type x AND float_type y) { - return __cos (x + y); + return __CONCATX(__,FUNC) (x + y); } diff --git a/sysdeps/m68k/fpu/k_cosf.c b/sysdeps/m68k/fpu/k_cosf.c index a6f0a26645..2a366d094b 100644 --- a/sysdeps/m68k/fpu/k_cosf.c +++ b/sysdeps/m68k/fpu/k_cosf.c @@ -1,26 +1,3 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -float -DEFUN(__kernel_cosf, (x, y), float x AND float y) -{ - return __cosf (x + y); -} +#define FUNC cosf +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/k_cosl.c b/sysdeps/m68k/fpu/k_cosl.c new file mode 100644 index 0000000000..983b66544c --- /dev/null +++ b/sysdeps/m68k/fpu/k_cosl.c @@ -0,0 +1,3 @@ +#define FUNC cosl +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c index 10cfbb4400..8c6dfef720 100644 --- a/sysdeps/m68k/fpu/k_sin.c +++ b/sysdeps/m68k/fpu/k_sin.c @@ -19,8 +19,18 @@ Cambridge, MA 02139, USA. */ #include #include -double -DEFUN(__kernel_sin, (x, y, iy), double x AND double y AND int iy) +#ifndef FUNC +#define FUNC sin +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float_type +DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy), + float_type x AND float_type y AND int iy) { - return __sin (x + y); + return __CONCATX(__,FUNC) (x + y); } diff --git a/sysdeps/m68k/fpu/k_sinf.c b/sysdeps/m68k/fpu/k_sinf.c index 245e86bd44..7050347c4b 100644 --- a/sysdeps/m68k/fpu/k_sinf.c +++ b/sysdeps/m68k/fpu/k_sinf.c @@ -1,26 +1,3 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -float -DEFUN(__kernel_sinf, (x, y, iy), float x AND float y AND int iy) -{ - return __sinf (x + y); -} +#define FUNC sinf +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/k_sinl.c b/sysdeps/m68k/fpu/k_sinl.c new file mode 100644 index 0000000000..5a647cafd7 --- /dev/null +++ b/sysdeps/m68k/fpu/k_sinl.c @@ -0,0 +1,3 @@ +#define FUNC sinl +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c index b18c9afbd8..c8fa9b780e 100644 --- a/sysdeps/m68k/fpu/k_tan.c +++ b/sysdeps/m68k/fpu/k_tan.c @@ -19,11 +19,21 @@ Cambridge, MA 02139, USA. */ #include #include -double -DEFUN(__kernel_tan, (x, y, iy), double x AND double y AND int iy) +#ifndef FUNC +#define FUNC tan +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float_type +DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy), + float_type x AND float_type y AND int iy) { if (iy == 1) - return __tan (x + y); + return __CONCATX(__,FUNC) (x + y); else - return -1.0 / __tan (x + y); + return ((float_type) -1.0) / __CONCATX(__,FUNC) (x + y); } diff --git a/sysdeps/m68k/fpu/k_tanf.c b/sysdeps/m68k/fpu/k_tanf.c index 027a74a525..777af1bf13 100644 --- a/sysdeps/m68k/fpu/k_tanf.c +++ b/sysdeps/m68k/fpu/k_tanf.c @@ -1,29 +1,3 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -float -DEFUN(__kernel_tanf, (x, y, iy), float x AND float y AND int iy) -{ - if (iy == 1) - return __tanf (x + y); - else - return -1.0 / __tanf (x + y); -} +#define FUNC tanf +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/k_tanl.c b/sysdeps/m68k/fpu/k_tanl.c new file mode 100644 index 0000000000..f2570e681f --- /dev/null +++ b/sysdeps/m68k/fpu/k_tanl.c @@ -0,0 +1,3 @@ +#define FUNC tanl +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/ldexp.c b/sysdeps/m68k/fpu/ldexp.c deleted file mode 100644 index 7e34882282..0000000000 --- a/sysdeps/m68k/fpu/ldexp.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1991, 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -double -DEFUN(ldexp, (x, exp), double x AND int exp) -{ - return __ldexp(x, exp); -} diff --git a/sysdeps/m68k/fpu/log.c b/sysdeps/m68k/fpu/log.c deleted file mode 100644 index 4de3346545..0000000000 --- a/sysdeps/m68k/fpu/log.c +++ /dev/null @@ -1,3 +0,0 @@ -#define FUNC log -#define OP logn -#include diff --git a/sysdeps/m68k/fpu/log10.c b/sysdeps/m68k/fpu/log10.c deleted file mode 100644 index 246b69a364..0000000000 --- a/sysdeps/m68k/fpu/log10.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC log10 -#include diff --git a/sysdeps/m68k/fpu/log1p.c b/sysdeps/m68k/fpu/log1p.c deleted file mode 100644 index 028783819b..0000000000 --- a/sysdeps/m68k/fpu/log1p.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC log1p -#include diff --git a/sysdeps/m68k/fpu/logb.c b/sysdeps/m68k/fpu/logb.c deleted file mode 100644 index 8619c908c8..0000000000 --- a/sysdeps/m68k/fpu/logb.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -#ifdef __GNUC__ - -/* Return the base 2 signed integral exponent of X. */ - -double -DEFUN(__logb, (x), double x) -{ - if (__isnan (x)) - return x; - if (__isinf (x)) - return fabs (x); - - if (x == 0.0) - asm ("flog2%.x %0, %0" : "=f" (x) : "0" (x)); - else - asm ("fgetexp%.x %0, %0" : "=f" (x) : "0" (x)); - - return x; -} - -weak_alias (__logb, logb) - -#else -#include -#endif diff --git a/sysdeps/m68k/fpu/pow.c b/sysdeps/m68k/fpu/pow.c deleted file mode 100644 index 5ace4dad2f..0000000000 --- a/sysdeps/m68k/fpu/pow.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1991, 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#define __NO_MATH_INLINES -#include - -double -DEFUN(pow, (x, y), double x AND double y) -{ - return __pow(x, y); -} diff --git a/sysdeps/m68k/fpu/rint.c b/sysdeps/m68k/fpu/rint.c deleted file mode 100644 index f83a4e4c3f..0000000000 --- a/sysdeps/m68k/fpu/rint.c +++ /dev/null @@ -1,5 +0,0 @@ -#define FUNC __rint -#define OP intr -#include - -weak_alias (__rint, rint) diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c index 51916e12ff..29717d4395 100644 --- a/sysdeps/m68k/fpu/s_atan.c +++ b/sysdeps/m68k/fpu/s_atan.c @@ -22,11 +22,14 @@ Cambridge, MA 02139, USA. */ #ifndef FUNC #define FUNC atan #endif +#ifndef float_type +#define float_type double +#endif #define __CONCATX(a,b) __CONCAT(a,b) -double -DEFUN(__CONCATX(__,FUNC), (x), double x) +float_type +DEFUN(__CONCATX(__,FUNC), (x), float_type x) { return __m81_u(__CONCATX(__,FUNC))(x); } diff --git a/sysdeps/m68k/fpu/s_atanf.c b/sysdeps/m68k/fpu/s_atanf.c index d26f83875b..c98559a8ba 100644 --- a/sysdeps/m68k/fpu/s_atanf.c +++ b/sysdeps/m68k/fpu/s_atanf.c @@ -1,35 +1,5 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - #ifndef FUNC #define FUNC atanf #endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float -DEFUN(__CONCATX(__,FUNC), (x), float x) -{ - return __m81_u(__CONCATX(__,FUNC))(x); -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (__CONCATX(__,FUNC), FUNC) +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_atanl.c b/sysdeps/m68k/fpu/s_atanl.c new file mode 100644 index 0000000000..b7e608addd --- /dev/null +++ b/sysdeps/m68k/fpu/s_atanl.c @@ -0,0 +1,5 @@ +#ifndef FUNC +#define FUNC atanl +#endif +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/s_ceill.c b/sysdeps/m68k/fpu/s_ceill.c new file mode 100644 index 0000000000..2bf95b00c6 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ceill.c @@ -0,0 +1,2 @@ +#define FUNC ceill +#include diff --git a/sysdeps/m68k/fpu/s_cosl.c b/sysdeps/m68k/fpu/s_cosl.c new file mode 100644 index 0000000000..4198feef18 --- /dev/null +++ b/sysdeps/m68k/fpu/s_cosl.c @@ -0,0 +1,2 @@ +#define FUNC cosl +#include diff --git a/sysdeps/m68k/fpu/s_expm1l.c b/sysdeps/m68k/fpu/s_expm1l.c new file mode 100644 index 0000000000..cd62cb3b21 --- /dev/null +++ b/sysdeps/m68k/fpu/s_expm1l.c @@ -0,0 +1,2 @@ +#define FUNC expm1l +#include diff --git a/sysdeps/m68k/fpu/s_fabsl.c b/sysdeps/m68k/fpu/s_fabsl.c new file mode 100644 index 0000000000..8ac14d5b8c --- /dev/null +++ b/sysdeps/m68k/fpu/s_fabsl.c @@ -0,0 +1,2 @@ +#define FUNC fabsl +#include diff --git a/sysdeps/m68k/fpu/s_finitel.c b/sysdeps/m68k/fpu/s_finitel.c new file mode 100644 index 0000000000..bd346a220c --- /dev/null +++ b/sysdeps/m68k/fpu/s_finitel.c @@ -0,0 +1,2 @@ +#define FUNC finitel +#include diff --git a/sysdeps/m68k/fpu/s_floorl.c b/sysdeps/m68k/fpu/s_floorl.c new file mode 100644 index 0000000000..2c1ffd7d2c --- /dev/null +++ b/sysdeps/m68k/fpu/s_floorl.c @@ -0,0 +1,2 @@ +#define FUNC floorl +#include diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c index 45c054016d..16f30394b2 100644 --- a/sysdeps/m68k/fpu/s_frexp.c +++ b/sysdeps/m68k/fpu/s_frexp.c @@ -19,9 +19,19 @@ Cambridge, MA 02139, USA. */ #include #include -double -DEFUN(__frexp, (value, expptr), double value AND int *expptr) +#ifndef FUNC +#define FUNC frexp +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float_type +DEFUN(__CONCATX(__,FUNC), (value, expptr), float_type value AND int *expptr) { - return __m81_u(__frexp)(value, expptr); + return __m81_u(__CONCATX(__,FUNC))(value, expptr); } -weak_alias (__frexp, frexp) +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_frexpf.c b/sysdeps/m68k/fpu/s_frexpf.c index dd30f6c39c..893b6ad3cf 100644 --- a/sysdeps/m68k/fpu/s_frexpf.c +++ b/sysdeps/m68k/fpu/s_frexpf.c @@ -1,27 +1,3 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -float -DEFUN(__frexpf, (value, expptr), float value AND int *expptr) -{ - return __m81_u(__frexpf)(value, expptr); -} -weak_alias (__frexpf, frexpf) +#define FUNC frexpf +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_frexpl.c b/sysdeps/m68k/fpu/s_frexpl.c new file mode 100644 index 0000000000..fe9466f3be --- /dev/null +++ b/sysdeps/m68k/fpu/s_frexpl.c @@ -0,0 +1,3 @@ +#define FUNC frexpl +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c index 4119df968a..c80a288949 100644 --- a/sysdeps/m68k/fpu/s_ilogb.c +++ b/sysdeps/m68k/fpu/s_ilogb.c @@ -19,10 +19,20 @@ Cambridge, MA 02139, USA. */ #include #include +#ifndef FUNC +#define FUNC ilogb +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + int -DEFUN(__ilogb, (x), double x) +DEFUN(__CONCATX(__,FUNC), (x), float_type x) { - return __m81_u(__ilogb)(x); + return __m81_u(__CONCATX(__,FUNC))(x); } -weak_alias (__ilogb, ilogb) +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx (__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/fpu/s_ilogbf.c index 8d9a027f22..c0c2ffd18d 100644 --- a/sysdeps/m68k/fpu/s_ilogbf.c +++ b/sysdeps/m68k/fpu/s_ilogbf.c @@ -1,28 +1,3 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -int -DEFUN(__ilogbf, (x), float x) -{ - return __m81_u(__ilogbf)(x); -} - -weak_alias (__ilogbf, ilogbf) +#define FUNC ilogbf +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_ilogbl.c b/sysdeps/m68k/fpu/s_ilogbl.c new file mode 100644 index 0000000000..c3554d5c58 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ilogbl.c @@ -0,0 +1,3 @@ +#define FUNC ilogbl +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c index eec07c7d3a..570a7ba7bb 100644 --- a/sysdeps/m68k/fpu/s_isinf.c +++ b/sysdeps/m68k/fpu/s_isinf.c @@ -22,11 +22,14 @@ Cambridge, MA 02139, USA. */ #ifndef FUNC #define FUNC isinf #endif +#ifndef float_type +#define float_type double +#endif #define __CONCATX(a,b) __CONCAT(a,b) int -DEFUN(__CONCATX(__,FUNC), (x), double x) +DEFUN(__CONCATX(__,FUNC), (x), float_type x) { return __m81_u(__CONCATX(__,FUNC))(x); } diff --git a/sysdeps/m68k/fpu/s_isinff.c b/sysdeps/m68k/fpu/s_isinff.c index 8f18db5b08..ebf4f2ae96 100644 --- a/sysdeps/m68k/fpu/s_isinff.c +++ b/sysdeps/m68k/fpu/s_isinff.c @@ -1,35 +1,5 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - #ifndef FUNC #define FUNC isinff #endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -int -DEFUN(__CONCATX(__,FUNC), (x), float x) -{ - return __m81_u(__CONCATX(__,FUNC))(x); -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (__CONCATX(__,FUNC), FUNC) +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_isinfl.c b/sysdeps/m68k/fpu/s_isinfl.c new file mode 100644 index 0000000000..963725ad77 --- /dev/null +++ b/sysdeps/m68k/fpu/s_isinfl.c @@ -0,0 +1,5 @@ +#ifndef FUNC +#define FUNC isinfl +#endif +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/s_isnanl.c b/sysdeps/m68k/fpu/s_isnanl.c new file mode 100644 index 0000000000..bbacb64f11 --- /dev/null +++ b/sysdeps/m68k/fpu/s_isnanl.c @@ -0,0 +1,2 @@ +#define FUNC isnanl +#include diff --git a/sysdeps/m68k/fpu/s_ldexp.c b/sysdeps/m68k/fpu/s_ldexp.c index 67513d4875..ea8bfbab88 100644 --- a/sysdeps/m68k/fpu/s_ldexp.c +++ b/sysdeps/m68k/fpu/s_ldexp.c @@ -22,11 +22,14 @@ Cambridge, MA 02139, USA. */ #ifndef FUNC #define FUNC ldexp #endif +#ifndef float_type +#define float_type double +#endif #define __CONCATX(a,b) __CONCAT(a,b) -double -DEFUN(__CONCATX(__,FUNC), (x, exp), double x AND int exp) +float_type +DEFUN(__CONCATX(__,FUNC), (x, exp), float_type x AND int exp) { return __m81_u(__CONCATX(__,FUNC))(x, exp); } diff --git a/sysdeps/m68k/fpu/s_ldexpf.c b/sysdeps/m68k/fpu/s_ldexpf.c index 94abf25ac1..81a6b28acc 100644 --- a/sysdeps/m68k/fpu/s_ldexpf.c +++ b/sysdeps/m68k/fpu/s_ldexpf.c @@ -1,35 +1,5 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - #ifndef FUNC #define FUNC ldexpf #endif - -#define __CONCATX(a,b) __CONCAT(a,b) - -float -DEFUN(__CONCATX(__,FUNC), (x, exp), float x AND int exp) -{ - return __m81_u(__CONCATX(__,FUNC))(x, exp); -} - -#define weak_aliasx(a,b) weak_alias(a,b) -weak_aliasx (__CONCATX(__,FUNC), FUNC) +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_ldexpl.c b/sysdeps/m68k/fpu/s_ldexpl.c new file mode 100644 index 0000000000..25796b75f4 --- /dev/null +++ b/sysdeps/m68k/fpu/s_ldexpl.c @@ -0,0 +1,5 @@ +#ifndef FUNC +#define FUNC ldexpl +#endif +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/s_log1pl.c b/sysdeps/m68k/fpu/s_log1pl.c new file mode 100644 index 0000000000..8dbef89095 --- /dev/null +++ b/sysdeps/m68k/fpu/s_log1pl.c @@ -0,0 +1,2 @@ +#define FUNC log1pl +#include diff --git a/sysdeps/m68k/fpu/s_logbl.c b/sysdeps/m68k/fpu/s_logbl.c new file mode 100644 index 0000000000..7d06ac13c4 --- /dev/null +++ b/sysdeps/m68k/fpu/s_logbl.c @@ -0,0 +1,2 @@ +#define FUNC logbl +#include diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c index ce70be8168..f704260e21 100644 --- a/sysdeps/m68k/fpu/s_modf.c +++ b/sysdeps/m68k/fpu/s_modf.c @@ -19,9 +19,19 @@ Cambridge, MA 02139, USA. */ #include #include -double -DEFUN(__modf, (x, exp), double x AND double *iptr) +#ifndef FUNC +#define FUNC modf +#endif +#ifndef float_type +#define float_type double +#endif + +#define __CONCATX(a,b) __CONCAT(a,b) + +float_type +DEFUN(__CONCATX(__,FUNC), (x, iptr), float_type x AND float_type *iptr) { - return __m81_u(__modf)(x, iptr); + return __m81_u(__CONCATX(__,FUNC))(x, iptr); } -weak_alias(__modf, modf) +#define weak_aliasx(a,b) weak_alias(a,b) +weak_aliasx(__CONCATX(__,FUNC), FUNC) diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/fpu/s_modff.c index 04b51d5be1..37bff0022f 100644 --- a/sysdeps/m68k/fpu/s_modff.c +++ b/sysdeps/m68k/fpu/s_modff.c @@ -1,27 +1,3 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include - -float -DEFUN(__modff, (x, exp), float x AND float *iptr) -{ - return __m81_u(__modff)(x, iptr); -} -weak_alias(__modff, modff) +#define FUNC modff +#define float_type float +#include diff --git a/sysdeps/m68k/fpu/s_modfl.c b/sysdeps/m68k/fpu/s_modfl.c new file mode 100644 index 0000000000..51327dd1aa --- /dev/null +++ b/sysdeps/m68k/fpu/s_modfl.c @@ -0,0 +1,3 @@ +#define FUNC modfl +#define float_type long double +#include diff --git a/sysdeps/m68k/fpu/s_rintl.c b/sysdeps/m68k/fpu/s_rintl.c new file mode 100644 index 0000000000..305667b3a1 --- /dev/null +++ b/sysdeps/m68k/fpu/s_rintl.c @@ -0,0 +1,2 @@ +#define FUNC rintl +#include diff --git a/sysdeps/m68k/fpu/s_scalbnl.c b/sysdeps/m68k/fpu/s_scalbnl.c new file mode 100644 index 0000000000..83e8bfefc1 --- /dev/null +++ b/sysdeps/m68k/fpu/s_scalbnl.c @@ -0,0 +1,2 @@ +#define FUNC scalbnl +#include diff --git a/sysdeps/m68k/fpu/s_significandl.c b/sysdeps/m68k/fpu/s_significandl.c new file mode 100644 index 0000000000..8c6fc7e610 --- /dev/null +++ b/sysdeps/m68k/fpu/s_significandl.c @@ -0,0 +1,2 @@ +#define FUNC significandl +#include diff --git a/sysdeps/m68k/fpu/s_sinl.c b/sysdeps/m68k/fpu/s_sinl.c new file mode 100644 index 0000000000..9ac532cb47 --- /dev/null +++ b/sysdeps/m68k/fpu/s_sinl.c @@ -0,0 +1,2 @@ +#define FUNC sinl +#include diff --git a/sysdeps/m68k/fpu/s_tanhl.c b/sysdeps/m68k/fpu/s_tanhl.c new file mode 100644 index 0000000000..6e997911f2 --- /dev/null +++ b/sysdeps/m68k/fpu/s_tanhl.c @@ -0,0 +1,2 @@ +#define FUNC tanhl +#include diff --git a/sysdeps/m68k/fpu/s_tanl.c b/sysdeps/m68k/fpu/s_tanl.c new file mode 100644 index 0000000000..64fcb54406 --- /dev/null +++ b/sysdeps/m68k/fpu/s_tanl.c @@ -0,0 +1,2 @@ +#define FUNC tanl +#include diff --git a/sysdeps/m68k/fpu/sin.c b/sysdeps/m68k/fpu/sin.c deleted file mode 100644 index 28ac9e50c3..0000000000 --- a/sysdeps/m68k/fpu/sin.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC sin -#include diff --git a/sysdeps/m68k/fpu/sinh.c b/sysdeps/m68k/fpu/sinh.c deleted file mode 100644 index fae7c71459..0000000000 --- a/sysdeps/m68k/fpu/sinh.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC sinh -#include diff --git a/sysdeps/m68k/fpu/sqrt.c b/sysdeps/m68k/fpu/sqrt.c deleted file mode 100644 index 2365b61780..0000000000 --- a/sysdeps/m68k/fpu/sqrt.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC sqrt -#include diff --git a/sysdeps/m68k/fpu/tan.c b/sysdeps/m68k/fpu/tan.c deleted file mode 100644 index 53b3b5342e..0000000000 --- a/sysdeps/m68k/fpu/tan.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC tan -#include diff --git a/sysdeps/m68k/fpu/tanh.c b/sysdeps/m68k/fpu/tanh.c deleted file mode 100644 index cc6739539a..0000000000 --- a/sysdeps/m68k/fpu/tanh.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC tanh -#include diff --git a/sysdeps/unix/sysv/linux/m68k/select.S b/sysdeps/unix/sysv/linux/m68k/select.S deleted file mode 100644 index 2770df82d1..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/select.S +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#include -#define _ERRNO_H -#include - -/* Linux has two versions of the select system call. The old one expected - one argument which must be a pointer to a struct which contains the - five values. The new version expects the five arguments be given in the - registers. First try the new version, if it's not available fall back - to the old version. */ - - .text - SYSCALL_ERROR_HANDLER -ENTRY (__select) - -#if 0 /* For now only use the old version. */ - DO_CALL (#SYS_ify (_newselect), 5) - tst.l %d0 - jmi 1f - rts - -1: move.l #-ENOSYS, %d1 - cmp.l %d1, %d0 - jne syscall_error /* Real error */ - - /* Try again using the old syscall interface. */ -#endif - lea 4(%sp), %a0 - move.l %a0, %d1 - move.l #SYS_ify (select), %d0 - trap #0 - tst.l %d0 - jmi syscall_error - ret - -weak_alias (__select, select) diff --git a/sysdeps/unix/sysv/linux/select.S b/sysdeps/unix/sysv/linux/select.S deleted file mode 100644 index 0c8160bd7f..0000000000 --- a/sysdeps/unix/sysv/linux/select.S +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#include - -/* Linux has two versions of the select system call. The old one expected - one argument which must be a pointer to a struct which contains the - five values. The new version expects the five arguments be given in the - registers. Of course we use the new version but the syscall name - is `_newsyscall'. So we do some name magic here. */ -#define ___newselect __select - -SYSCALL__ (_newselect, 5) - ret - -weak_alias (__select, select) diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index db27320c93..8f0dec0b19 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -40,6 +40,7 @@ sched_yield - sched_yield 0 __sched_yield sched_yield sched_primax - sched_get_priority_max 1 __sched_get_priority_max sched_get_priority_max sched_primin - sched_get_priority_min 1 __sched_get_priority_min sched_get_priority_min sched_rr_gi - sched_rr_get_interval 2 __sched_rr_get_interval sched_rr_get_interval +select - _newselect 5 __select select setfsgid - setfsgid 1 setfsgid setfsuid - setfsuid 1 setfsuid setpgid - setpgid 2 __setpgid setpgid -- cgit 1.4.1