aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/m68k/fpu
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/m68k/fpu')
-rw-r--r--sysdeps/m68k/fpu/__math.h364
-rw-r--r--sysdeps/m68k/fpu/e_acos.c31
-rw-r--r--sysdeps/m68k/fpu/e_acosf.c31
-rw-r--r--sysdeps/m68k/fpu/e_asin.c2
-rw-r--r--sysdeps/m68k/fpu/e_asinf.c2
-rw-r--r--sysdeps/m68k/fpu/e_atanh.c2
-rw-r--r--sysdeps/m68k/fpu/e_atanhf.c2
-rw-r--r--sysdeps/m68k/fpu/e_cosh.c2
-rw-r--r--sysdeps/m68k/fpu/e_coshf.c2
-rw-r--r--sysdeps/m68k/fpu/e_exp.c2
-rw-r--r--sysdeps/m68k/fpu/e_expf.c2
-rw-r--r--sysdeps/m68k/fpu/e_fmod.c31
-rw-r--r--sysdeps/m68k/fpu/e_fmodf.c31
-rw-r--r--sysdeps/m68k/fpu/e_log.c2
-rw-r--r--sysdeps/m68k/fpu/e_log10.c2
-rw-r--r--sysdeps/m68k/fpu/e_log10f.c2
-rw-r--r--sysdeps/m68k/fpu/e_logf.c2
-rw-r--r--sysdeps/m68k/fpu/e_pow.c2
-rw-r--r--sysdeps/m68k/fpu/e_powf.c2
-rw-r--r--sysdeps/m68k/fpu/e_remainder.c2
-rw-r--r--sysdeps/m68k/fpu/e_remainderf.c2
-rw-r--r--sysdeps/m68k/fpu/e_scalb.c2
-rw-r--r--sysdeps/m68k/fpu/e_scalbf.c2
-rw-r--r--sysdeps/m68k/fpu/e_sinh.c2
-rw-r--r--sysdeps/m68k/fpu/e_sinhf.c2
-rw-r--r--sysdeps/m68k/fpu/e_sqrt.c2
-rw-r--r--sysdeps/m68k/fpu/e_sqrtf.c2
-rw-r--r--sysdeps/m68k/fpu/isinfl.c29
-rw-r--r--sysdeps/m68k/fpu/isnanl.c29
-rw-r--r--sysdeps/m68k/fpu/k_cos.c26
-rw-r--r--sysdeps/m68k/fpu/k_cosf.c26
-rw-r--r--sysdeps/m68k/fpu/k_sin.c26
-rw-r--r--sysdeps/m68k/fpu/k_sinf.c26
-rw-r--r--sysdeps/m68k/fpu/k_tan.c29
-rw-r--r--sysdeps/m68k/fpu/k_tanf.c29
-rw-r--r--sysdeps/m68k/fpu/s_atan.c36
-rw-r--r--sysdeps/m68k/fpu/s_atanf.c36
-rw-r--r--sysdeps/m68k/fpu/s_ceil.c2
-rw-r--r--sysdeps/m68k/fpu/s_ceilf.c2
-rw-r--r--sysdeps/m68k/fpu/s_cos.c2
-rw-r--r--sysdeps/m68k/fpu/s_cosf.c2
-rw-r--r--sysdeps/m68k/fpu/s_expm1.c2
-rw-r--r--sysdeps/m68k/fpu/s_expm1f.c2
-rw-r--r--sysdeps/m68k/fpu/s_fabs.c2
-rw-r--r--sysdeps/m68k/fpu/s_fabsf.c2
-rw-r--r--sysdeps/m68k/fpu/s_finite.c2
-rw-r--r--sysdeps/m68k/fpu/s_finitef.c2
-rw-r--r--sysdeps/m68k/fpu/s_floor.c2
-rw-r--r--sysdeps/m68k/fpu/s_floorf.c2
-rw-r--r--sysdeps/m68k/fpu/s_frexp.c28
-rw-r--r--sysdeps/m68k/fpu/s_frexpf.c28
-rw-r--r--sysdeps/m68k/fpu/s_ilogb.c29
-rw-r--r--sysdeps/m68k/fpu/s_ilogbf.c29
-rw-r--r--sysdeps/m68k/fpu/s_isinf.c36
-rw-r--r--sysdeps/m68k/fpu/s_isinff.c36
-rw-r--r--sysdeps/m68k/fpu/s_isnan.c2
-rw-r--r--sysdeps/m68k/fpu/s_isnanf.c2
-rw-r--r--sysdeps/m68k/fpu/s_ldexp.c36
-rw-r--r--sysdeps/m68k/fpu/s_ldexpf.c36
-rw-r--r--sysdeps/m68k/fpu/s_log1p.c2
-rw-r--r--sysdeps/m68k/fpu/s_log1pf.c2
-rw-r--r--sysdeps/m68k/fpu/s_logb.c2
-rw-r--r--sysdeps/m68k/fpu/s_logbf.c2
-rw-r--r--sysdeps/m68k/fpu/s_modf.c28
-rw-r--r--sysdeps/m68k/fpu/s_modff.c28
-rw-r--r--sysdeps/m68k/fpu/s_rint.c2
-rw-r--r--sysdeps/m68k/fpu/s_rintf.c2
-rw-r--r--sysdeps/m68k/fpu/s_scalbn.c2
-rw-r--r--sysdeps/m68k/fpu/s_scalbnf.c2
-rw-r--r--sysdeps/m68k/fpu/s_significand.c2
-rw-r--r--sysdeps/m68k/fpu/s_significandf.c2
-rw-r--r--sysdeps/m68k/fpu/s_sin.c2
-rw-r--r--sysdeps/m68k/fpu/s_sinf.c2
-rw-r--r--sysdeps/m68k/fpu/s_tan.c2
-rw-r--r--sysdeps/m68k/fpu/s_tanf.c2
-rw-r--r--sysdeps/m68k/fpu/s_tanh.c2
-rw-r--r--sysdeps/m68k/fpu/s_tanhf.c2
77 files changed, 1110 insertions, 88 deletions
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index e357364fb7..f59c168e79 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -19,8 +19,6 @@ Cambridge, MA 02139, USA. */
#ifdef __GNUC__
#include <sys/cdefs.h>
-#define __need_Emath
-#include <errno.h>
#ifdef __NO_MATH_INLINES
/* This is used when defining the functions themselves. Define them with
@@ -34,59 +32,87 @@ Cambridge, MA 02139, USA. */
#define __MATH_INLINES 1
#endif
-#define __inline_mathop2(func, op) \
- __m81_inline double \
- __m81_u(func)(double __mathop_x) __attribute__((__const__)); \
- __m81_inline double \
- __m81_u(func)(double __mathop_x) \
+/* Define a const math function. */
+#define __m81_defun(rettype, func, args) \
+ __m81_inline rettype \
+ __m81_u(func) args __attribute__((__const__)); \
+ __m81_inline rettype \
+ __m81_u(func) args
+
+#define __inline_mathop(func, op) \
+ __m81_defun (double, func, (double __mathop_x)) \
{ \
double __result; \
__asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
return __result; \
}
-#define __inline_mathop(op) __inline_mathop2(op, op)
-
-__inline_mathop(acos)
-__inline_mathop(asin)
-__inline_mathop(atan)
-__inline_mathop(cos)
-__inline_mathop(sin)
-__inline_mathop(tan)
-__inline_mathop(cosh)
-__inline_mathop(sinh)
-__inline_mathop(tanh)
-__inline_mathop2(exp, etox)
-__inline_mathop2(fabs, abs)
-__inline_mathop(log10)
-__inline_mathop2(log, logn)
-__inline_mathop(sqrt)
-
-__inline_mathop2(__rint, int)
-__inline_mathop2(__expm1, etoxm1)
-
-#ifdef __USE_MISC
-#ifndef __NO_MATH_INLINES
-__inline_mathop2(rint, int)
-__inline_mathop2(expm1, etoxm1)
-#endif
-__inline_mathop2(log1p, lognp1)
-__inline_mathop(atanh)
-#endif
-__m81_inline double
-__m81_u(__drem)(double __x, double __y) __attribute__ ((__const__));
-__m81_inline double
-__m81_u(__drem)(double __x, double __y)
+#define __inline_mathopf(func, op) \
+ __m81_defun (float, func, (float __mathop_x)) \
+ { \
+ float __result; \
+ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
+ return __result; \
+ }
+
+/* ieee style elementary functions */
+__inline_mathop(__ieee754_acos, acos)
+__inline_mathop(__ieee754_asin, asin)
+__inline_mathop(__ieee754_cosh, cosh)
+__inline_mathop(__ieee754_sinh, sinh)
+__inline_mathop(__ieee754_exp, etox)
+__inline_mathop(__ieee754_log10, log10)
+__inline_mathop(__ieee754_log, logn)
+__inline_mathop(__ieee754_sqrt, sqrt)
+__inline_mathop(__ieee754_atanh, atanh)
+
+/* ieee style elementary float functions */
+__inline_mathopf(__ieee754_acosf, acos)
+__inline_mathopf(__ieee754_asinf, asin)
+__inline_mathopf(__ieee754_coshf, cosh)
+__inline_mathopf(__ieee754_sinhf, sinh)
+__inline_mathopf(__ieee754_expf, etox)
+__inline_mathopf(__ieee754_log10f, log10)
+__inline_mathopf(__ieee754_logf, logn)
+__inline_mathopf(__ieee754_sqrtf, sqrt)
+__inline_mathopf(__ieee754_atanhf, atan)
+
+__inline_mathop(__atan, atan)
+__inline_mathop(__cos, cos)
+__inline_mathop(__sin, sin)
+__inline_mathop(__tan, tan)
+__inline_mathop(__tanh, tanh)
+__inline_mathop(__fabs, abs)
+__inline_mathop(__sqrt, sqrt)
+
+__inline_mathop(__rint, int)
+__inline_mathop(__expm1, etoxm1)
+__inline_mathop(__log1p, lognp1)
+__inline_mathop(__logb, log2)
+__inline_mathop(__significand, getman)
+
+__inline_mathopf(__atanf, atan)
+__inline_mathopf(__cosf, cos)
+__inline_mathopf(__sinf, sin)
+__inline_mathopf(__tanf, tan)
+__inline_mathopf(__tanhf, tanh)
+__inline_mathopf(__fabsf, abs)
+__inline_mathopf(__sqrtf, sqrt)
+
+__inline_mathopf(__rintf, int)
+__inline_mathopf(__expm1f, etoxm1)
+__inline_mathopf(__log1pf, lognp1)
+__inline_mathopf(__logbf, log2)
+__inline_mathopf(__significandf, getman)
+
+__m81_defun (double, __ieee754_remainder, (double __x, double __y))
{
double __result;
__asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
return __result;
}
-__m81_inline double
-__m81_u(ldexp)(double __x, int __e) __attribute__ ((__const__));
-__m81_inline double
-__m81_u(ldexp)(double __x, int __e)
+__m81_defun (double, __ldexp, (double __x, int __e))
{
double __result;
double __double_e = (double) __e;
@@ -94,10 +120,7 @@ __m81_u(ldexp)(double __x, int __e)
return __result;
}
-__m81_inline double
-__m81_u(fmod)(double __x, double __y) __attribute__ ((__const__));
-__m81_inline double
-__m81_u(fmod)(double __x, double __y)
+__m81_defun (double, __ieee754_fmod, (double __x, double __y))
{
double __result;
__asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
@@ -105,7 +128,7 @@ __m81_u(fmod)(double __x, double __y)
}
__m81_inline double
-__m81_u(frexp)(double __value, int *__expptr)
+__m81_u(__frexp)(double __value, int *__expptr)
{
double __mantissa, __exponent;
__asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value));
@@ -114,10 +137,7 @@ __m81_u(frexp)(double __value, int *__expptr)
return __mantissa;
}
-__m81_inline double
-__m81