]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* sysdeps/m68k/fpu/bits/mathinline.h: Move all libm internal
authorAndreas Schwab <schwab@suse.de>
Sat, 26 Jun 1999 16:43:55 +0000 (16:43 +0000)
committerAndreas Schwab <schwab@suse.de>
Sat, 26 Jun 1999 16:43:55 +0000 (16:43 +0000)
definitions...
* sysdeps/m68k/fpu/mathimpl.h: ... here.  New file.
* sysdeps/m68k/fpu/e_acos.c: Include "mathimpl.h".
* sysdeps/m68k/fpu/e_atan2.c: Likewise.
* sysdeps/m68k/fpu/e_fmod.c: Likewise.
* sysdeps/m68k/fpu/e_pow.c: Likewise.
* sysdeps/m68k/fpu/e_scalb.c: Likewise.
* sysdeps/m68k/fpu/s_ccos.c: Likewise.
* sysdeps/m68k/fpu/s_ccosh.c: Likewise.
* sysdeps/m68k/fpu/s_cexp.c: Likewise.
* sysdeps/m68k/fpu/s_csin.c: Likewise.
* sysdeps/m68k/fpu/s_csinh.c: Likewise.
* sysdeps/m68k/fpu/s_ilogb.c: Likewise.
* sysdeps/m68k/fpu/s_llrint.c: Likewise.
* sysdeps/m68k/fpu/s_llrintf.c: Likewise.
* sysdeps/m68k/fpu/s_llrintl.c: Likewise.
* sysdeps/m68k/fpu/s_modf.c: Likewise.

17 files changed:
sysdeps/m68k/fpu/bits/mathinline.h
sysdeps/m68k/fpu/e_acos.c
sysdeps/m68k/fpu/e_atan2.c
sysdeps/m68k/fpu/e_fmod.c
sysdeps/m68k/fpu/e_pow.c
sysdeps/m68k/fpu/e_scalb.c
sysdeps/m68k/fpu/mathimpl.h [new file with mode: 0644]
sysdeps/m68k/fpu/s_ccos.c
sysdeps/m68k/fpu/s_ccosh.c
sysdeps/m68k/fpu/s_cexp.c
sysdeps/m68k/fpu/s_csin.c
sysdeps/m68k/fpu/s_csinh.c
sysdeps/m68k/fpu/s_ilogb.c
sysdeps/m68k/fpu/s_llrint.c
sysdeps/m68k/fpu/s_llrintf.c
sysdeps/m68k/fpu/s_llrintl.c
sysdeps/m68k/fpu/s_modf.c

index b1e2a75f1b354eb0a6a348b7bbd7c87d5024565e..c753fae827f3fbd92e07e6fab3bd7fda1ef1e001 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of inline math functions implemented by the m68881/2.
-   Copyright (C) 1991, 92, 93, 94, 96, 97, 98 Free Software Foundation, Inc.
+   Copyright (C) 1991,92,93,94,96,97,98,99 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
     return __result;                                                         \
   }
 
-#ifdef __LIBC_INTERNAL_MATH_INLINES
-/* ieee style elementary functions */
-/* These are internal to the implementation of libm.  */
-__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_exp2, twotox)
-__inline_mathop(__ieee754_exp10, tentox)
-__inline_mathop(__ieee754_log10, log10)
-__inline_mathop(__ieee754_log, logn)
-__inline_mathop(__ieee754_sqrt, sqrt)
-__inline_mathop(__ieee754_atanh, atanh)
-#endif
-
 __inline_mathop(__atan, atan)
 __inline_mathop(__cos, cos)
 __inline_mathop(__sin, sin)
@@ -180,52 +164,9 @@ __inline_mathop(trunc, intrz)
 #endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
 
 /* This macro contains the definition for the rest of the inline
-   functions, using __FLOAT_TYPE as the domain type and __S as the suffix
+   functions, using FLOAT_TYPE as the domain type and S as the suffix
    for the function names.  */
 
-#ifdef __LIBC_INTERNAL_MATH_INLINES
-/* Internally used functions.  */
-# define __internal_inline_functions(float_type, s)                         \
-__m81_defun (float_type, __CONCAT(__ieee754_remainder,s),                   \
-            (float_type __x, float_type __y))                               \
-{                                                                           \
-  float_type __result;                                                      \
-  __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));         \
-  return __result;                                                          \
-}                                                                           \
-                                                                            \
-__m81_defun (float_type, __CONCAT(__ieee754_fmod,s),                        \
-            (float_type __x, float_type __y))                               \
-{                                                                           \
-  float_type __result;                                                      \
-  __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));         \
-  return __result;                                                          \
-}
-
-__internal_inline_functions (double,)
-__internal_inline_functions (float,f)
-__internal_inline_functions (long double,l)
-# undef __internal_inline_functions
-
-/* Get the m68881 condition codes, to quickly check multiple conditions.  */
-static __inline__ unsigned long
-__m81_test (long double __val)
-{
-  unsigned long __fpsr;
-  __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val));
-  return __fpsr;
-}
-
-/* Bit values returned by __m81_test.  */
-# define __M81_COND_NAN (1 << 24)
-# define __M81_COND_INF (2 << 24)
-# define __M81_COND_ZERO (4 << 24)
-# define __M81_COND_NEG (8 << 24)
-
-#endif /* __LIBC_INTENRAL_MATH_INLINES */
-
-/* The rest of the functions are available to the user.  */
-
 #define __inline_functions(float_type, s)                                \
 __m81_inline float_type                                                          \
 __m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr)                  \
index 80803ff80f33cedd54a5045727d41394a92e6c3f..4226b7326546d133a6f0d7ab1de3230150d80bda 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 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
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include "math_private.h"
+#include "mathimpl.h"
 
 #ifndef        FUNC
 #define        FUNC    __ieee754_acos
index 7b275b4048fe07d549c744b23bbc3e12b3e01a8c..6a5af2a9c0c058a13a5a0c9e65539773abf2ff9d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999 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
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include "math_private.h"
+#include "mathimpl.h"
 
 #ifndef SUFF
 #define SUFF
index 9e59a433024a32ca7f7c0764ce1ae321413107bc..9695a863ff03fee7cb9401ff6b095d4ca5558c55 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 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
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include "math_private.h"
+#include "mathimpl.h"
 
 #ifndef FUNC
 #define FUNC __ieee754_fmod
index ee95a393950926d6f0ad8e2703a42761a124f43f..3dc3d819aba3d938dcac9498845266e3f4670257 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999 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
@@ -18,6 +18,7 @@
 
 #include <math.h>
 #include "math_private.h"
+#include "mathimpl.h"
 
 #ifndef SUFF
 #define SUFF
index ef1724b036a1f3fd111c2709dc54623c430ad917..22332ca3ad3f527be9bddce7f9b0d2ec6b1d399d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
 
@@ -18,6 +18,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <math.h>
+#include "mathimpl.h"
 
 #ifndef SUFF
 #define SUFF
diff --git a/sysdeps/m68k/fpu/mathimpl.h b/sysdeps/m68k/fpu/mathimpl.h
new file mode 100644 (file)
index 0000000..a2785b2
--- /dev/null
@@ -0,0 +1,93 @@
+/* Definitions of libc internal inline math functions implemented
+   by the m68881/2.
+   Copyright (C) 1991,92,93,94,96,97,98,99 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.  */
+
+/* This file contains the definitions of the inline math functions that
+   are only used internally inside libm, not visible to the user.  */
+
+__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_exp2, twotox)
+__inline_mathop        (__ieee754_exp10, tentox)
+__inline_mathop        (__ieee754_log10, log10)
+__inline_mathop        (__ieee754_log, logn)
+__inline_mathop        (__ieee754_sqrt, sqrt)
+__inline_mathop        (__ieee754_atanh, atanh)
+
+__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_defun (float, __ieee754_remainderf, (float __x, float __y))
+{
+  float __result;
+  __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+  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 (double, __ieee754_fmod, (double __x, double __y))
+{
+  double __result;
+  __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+  return __result;
+}
+
+__m81_defun (float, __ieee754_fmodf, (float __x, float __y))
+{
+  float __result;
+  __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "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;
+}
+
+/* Get the m68881 condition codes, to quickly check multiple conditions.  */
+static __inline__ unsigned long
+__m81_test (long double __val)
+{
+  unsigned long __fpsr;
+  __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val));
+  return __fpsr;
+}
+
+/* Bit values returned by __m81_test.  */
+#define __M81_COND_NAN  (1 << 24)
+#define __M81_COND_INF  (2 << 24)
+#define __M81_COND_ZERO (4 << 24)
+#define __M81_COND_NEG  (8 << 24)
index fbd5ef53888dd5e810caa7b3b70fcf98f704b2c3..6f1232f99ad6e3316d8176dac8f072c6ad285c80 100644 (file)
@@ -1,5 +1,5 @@
 /* Complex cosine function.  m68k fpu version
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
 
@@ -20,6 +20,7 @@
 
 #include <complex.h>
 #include <math.h>
+#include "mathimpl.h"
 
 #ifndef SUFF
 #define SUFF
index af751430de123288fe014f9f637ac4e37c779146..437d42dfe81791934e4b4796ad9f2c208505ff2a 100644 (file)
@@ -1,5 +1,5 @@
 /* Complex cosine hyperbole function.  m68k fpu version
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
 
@@ -20,6 +20,7 @@
 
 #include <complex.h>
 #include <math.h>
+#include "mathimpl.h"
 
 #ifndef SUFF
 #define SUFF
index fcf87ed687cee981be35d05dd22bbc62a19389b8..899fdc4785712dd35b41bd4fa4517c62597fa8aa 100644 (file)
@@ -1,5 +1,5 @@
 /* Complex exponential function.  m68k fpu version
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
 
@@ -20,6 +20,7 @@
 
 #include <complex.h>
 #include <math.h>
+#include "mathimpl.h"
 
 #ifndef SUFF
 #define SUFF
index 72214c4cffeba3647e58939751b136a1f364253e..11e217b9b69e4efb879dbd90ad46034eb6584919 100644 (file)
@@ -1,5 +1,5 @@
 /* Complex sine function.  m68k fpu version
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
 
@@ -20,6 +20,7 @@
 
 #include <complex.h>
 #include <math.h>
+#include "mathimpl.h"
 
 #ifndef SUFF
 #define SUFF
index e829f4d3aee18a0f3e7c1da0e1f35ab84c3243c4..4dfbe129b4b4c3f695feea7528884c44e3c2e2ce 100644 (file)
@@ -1,5 +1,5 @@
 /* Complex sine hyperbole function.  m68k fpu version
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
 
@@ -20,6 +20,7 @@
 
 #include <complex.h>
 #include <math.h>
+#include "mathimpl.h"
 
 #ifndef SUFF
 #define SUFF
index ef90946f599fec18c1034b73ae460387e3d97cf1..15cff29c60bde0038efbe7ac01467e2d0534453c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 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
@@ -17,6 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <math.h>
+#include "mathimpl.h"
 
 #ifndef SUFF
 #define SUFF
index 423939aa0b6d93377f1f2887cf78dc9c5022f55f..b733d77260e68114f2ea62755a8eddbf3c7e3c32 100644 (file)
@@ -1,6 +1,6 @@
 /* Round argument to nearest integral value according to current rounding
    direction.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
 
@@ -21,6 +21,7 @@
 
 #include <math.h>
 #include "math_private.h"
+#include "mathimpl.h"
 
 long long int
 __llrint (double x)
index 0cd12c9920cb1d88d489b392739b8e7d8837275d..b9ba5a0148668992bbe76b3ae7545e58d1bdd0ce 100644 (file)
@@ -1,6 +1,6 @@
 /* Round argument to nearest integral value according to current rounding
    direction.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
 
@@ -21,6 +21,7 @@
 
 #include <math.h>
 #include "math_private.h"
+#include "mathimpl.h"
 
 long long int
 __llrintf (float x)
index 6f63e0bcd145ee09445d5f18525efd1cb40ad9b4..c874bfdde012f3f73fb79e9651fbaa4b093aa8bb 100644 (file)
@@ -1,6 +1,6 @@
 /* Round argument to nearest integral value according to current rounding
    direction.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
 
@@ -21,6 +21,7 @@
 
 #include <math.h>
 #include "math_private.h"
+#include "mathimpl.h"
 
 long long int
 __llrintl (long double x)
index 52ee64caad21f8719dc89331f771d01ac8939b8d..d19f2a7f89b25ae8d8edefbc8c65d09a9dd8f2a7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 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
@@ -17,6 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <math.h>
+#include "mathimpl.h"
 
 #ifndef SUFF
 #define SUFF