From 75b683dffd777543d6d051e5990ae413d050bebf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 6 Jun 1996 05:20:49 +0000 Subject: [PATCH] Tue Jun 4 22:03:02 1996 Andreas Schwab * 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/e_acosf.c | 29 ++--------------------------- sysdeps/m68k/fpu/e_fmodf.c | 29 ++--------------------------- sysdeps/m68k/fpu/k_cosf.c | 29 +++-------------------------- sysdeps/m68k/fpu/k_sinf.c | 29 +++-------------------------- sysdeps/m68k/fpu/k_tanf.c | 32 +++----------------------------- sysdeps/m68k/fpu/s_atanf.c | 34 ++-------------------------------- sysdeps/m68k/fpu/s_frexpf.c | 30 +++--------------------------- sysdeps/m68k/fpu/s_ilogbf.c | 31 +++---------------------------- sysdeps/m68k/fpu/s_isinff.c | 34 ++-------------------------------- sysdeps/m68k/fpu/s_ldexpf.c | 34 ++-------------------------------- sysdeps/m68k/fpu/s_modff.c | 30 +++--------------------------- 11 files changed, 28 insertions(+), 313 deletions(-) diff --git a/sysdeps/m68k/fpu/e_acosf.c b/sysdeps/m68k/fpu/e_acosf.c index 34da7ee1636..90665082d38 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_fmodf.c b/sysdeps/m68k/fpu/e_fmodf.c index b3c3eadddf5..88c350ce9eb 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/k_cosf.c b/sysdeps/m68k/fpu/k_cosf.c index a6f0a266452..2a366d094bc 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_sinf.c b/sysdeps/m68k/fpu/k_sinf.c index 245e86bd446..7050347c4b7 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_tanf.c b/sysdeps/m68k/fpu/k_tanf.c index 027a74a5257..777af1bf133 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/s_atanf.c b/sysdeps/m68k/fpu/s_atanf.c index d26f83875b6..c98559a8ba0 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_frexpf.c b/sysdeps/m68k/fpu/s_frexpf.c index dd30f6c39cc..893b6ad3cf6 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_ilogbf.c b/sysdeps/m68k/fpu/s_ilogbf.c index 8d9a027f224..c0c2ffd18dc 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_isinff.c b/sysdeps/m68k/fpu/s_isinff.c index 8f18db5b088..ebf4f2ae96a 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_ldexpf.c b/sysdeps/m68k/fpu/s_ldexpf.c index 94abf25ac1e..81a6b28accd 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_modff.c b/sysdeps/m68k/fpu/s_modff.c index 04b51d5be19..37bff0022fa 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 -- 2.47.3