From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55494 invoked by alias); 17 Oct 2019 21:10:23 -0000 Mailing-List: contact glibc-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: glibc-cvs-owner@sourceware.org List-Subscribe: Received: (qmail 55476 invoked by uid 9943); 17 Oct 2019 21:10:23 -0000 Date: Thu, 17 Oct 2019 21:10:00 -0000 Message-ID: <20191017211023.55475.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/ffinite-math-compat] Remove math-finite.h X-Act-Checkin: glibc X-Git-Author: Wilco Dijkstra X-Git-Refname: refs/heads/azanella/ffinite-math-compat X-Git-Oldrev: 765cdd0bffd77960ae852104fc4ea5edcdb8aed3 X-Git-Newrev: cdcfbff55af60ef7472ad4b08320ddc076c17408 X-SW-Source: 2019-q4/txt/msg00101.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cdcfbff55af60ef7472ad4b08320ddc076c17408 commit cdcfbff55af60ef7472ad4b08320ddc076c17408 Author: Wilco Dijkstra Date: Tue Jul 16 10:08:57 2019 -0300 Remove math-finite.h Remove math-finite.h redirections for math functions. Passes buildmanyglibc. Diff: --- bits/math-finite.h | 197 -------------------------------- math/Makefile | 3 +- math/math.h | 220 ------------------------------------ sysdeps/ia64/fpu/bits/math-finite.h | 24 ---- 4 files changed, 1 insertion(+), 443 deletions(-) diff --git a/bits/math-finite.h b/bits/math-finite.h deleted file mode 100644 index 8cc3aec..0000000 --- a/bits/math-finite.h +++ /dev/null @@ -1,197 +0,0 @@ -/* Entry points to finite-math-only compiler runs. - Copyright (C) 2011-2019 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _MATH_H -# error "Never use directly; include instead." -#endif - -#define __REDIRFROM(...) __REDIRFROM_X(__VA_ARGS__) - -#define __REDIRTO(...) __REDIRTO_X(__VA_ARGS__) - -#define __MATH_REDIRCALL_X(from, args, to) \ - extern _Mdouble_ __REDIRECT_NTH (from, args, to) -#define __MATH_REDIRCALL(function, reentrant, args) \ - __MATH_REDIRCALL_X \ - (__REDIRFROM (function, reentrant), args, \ - __REDIRTO (function, reentrant)) -#define __MATH_REDIRCALL_2(from, reentrant, args, to) \ - __MATH_REDIRCALL_X \ - (__REDIRFROM (from, reentrant), args, \ - __REDIRTO (to, reentrant)) - -#define __MATH_REDIRCALL_INTERNAL(function, reentrant, args) \ - __MATH_REDIRCALL_X \ - (__REDIRFROM (__CONCAT (__, function), \ - __CONCAT (reentrant, _finite)), \ - args, __REDIRTO (function, _r)) - - -/* acos. */ -__MATH_REDIRCALL (acos, , (_Mdouble_)); - -#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* acosh. */ -__MATH_REDIRCALL (acosh, , (_Mdouble_)); -#endif - -/* asin. */ -__MATH_REDIRCALL (asin, , (_Mdouble_)); - -/* atan2. */ -__MATH_REDIRCALL (atan2, , (_Mdouble_, _Mdouble_)); - -#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* atanh. */ -__MATH_REDIRCALL (atanh, , (_Mdouble_)); -#endif - -/* cosh. */ -__MATH_REDIRCALL (cosh, , (_Mdouble_)); - -/* exp. */ -__MATH_REDIRCALL (exp, , (_Mdouble_)); - -#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X) -/* exp10. */ -__MATH_REDIRCALL (exp10, , (_Mdouble_)); -#endif - -#ifdef __USE_ISOC99 -/* exp2. */ -__MATH_REDIRCALL (exp2, , (_Mdouble_)); -#endif - -/* fmod. */ -__MATH_REDIRCALL (fmod, , (_Mdouble_, _Mdouble_)); - -#if defined __USE_XOPEN || defined __USE_ISOC99 -/* hypot. */ -__MATH_REDIRCALL (hypot, , (_Mdouble_, _Mdouble_)); -#endif - -#if (__MATH_DECLARING_DOUBLE && (defined __USE_MISC || defined __USE_XOPEN)) \ - || (!__MATH_DECLARING_DOUBLE && defined __USE_MISC) -/* j0. */ -__MATH_REDIRCALL (j0, , (_Mdouble_)); - -/* y0. */ -__MATH_REDIRCALL (y0, , (_Mdouble_)); - -/* j1. */ -__MATH_REDIRCALL (j1, , (_Mdouble_)); - -/* y1. */ -__MATH_REDIRCALL (y1, , (_Mdouble_)); - -/* jn. */ -__MATH_REDIRCALL (jn, , (int, _Mdouble_)); - -/* yn. */ -__MATH_REDIRCALL (yn, , (int, _Mdouble_)); -#endif - -#ifdef __USE_MISC -/* lgamma_r. */ -__MATH_REDIRCALL (lgamma, _r, (_Mdouble_, int *)); -#endif - -/* Redirect __lgammal_r_finite to __lgamma_r_finite when __NO_LONG_DOUBLE_MATH - is set and to itself otherwise. It also redirects __lgamma_r_finite and - __lgammaf_r_finite to themselves. */ -__MATH_REDIRCALL_INTERNAL (lgamma, _r, (_Mdouble_, int *)); - -#if ((defined __USE_XOPEN || defined __USE_ISOC99) \ - && defined __extern_always_inline) -/* lgamma. */ -__extern_always_inline _Mdouble_ -__NTH (__REDIRFROM (lgamma, ) (_Mdouble_ __d)) -{ -# if defined __USE_MISC || defined __USE_XOPEN - return __REDIRTO (lgamma, _r) (__d, &signgam); -# else - int __local_signgam = 0; - return __REDIRTO (lgamma, _r) (__d, &__local_signgam); -# endif -} -#endif - -#if ((defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)) \ - && defined __extern_always_inline) && !__MATH_DECLARING_FLOATN -/* gamma. */ -__extern_always_inline _Mdouble_ -__NTH (__REDIRFROM (gamma, ) (_Mdouble_ __d)) -{ - return __REDIRTO (lgamma, _r) (__d, &signgam); -} -#endif - -/* log. */ -__MATH_REDIRCALL (log, , (_Mdouble_)); - -/* log10. */ -__MATH_REDIRCALL (log10, , (_Mdouble_)); - -#ifdef __USE_ISOC99 -/* log2. */ -__MATH_REDIRCALL (log2, , (_Mdouble_)); -#endif - -/* pow. */ -__MATH_REDIRCALL (pow, , (_Mdouble_, _Mdouble_)); - -#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* remainder. */ -__MATH_REDIRCALL (remainder, , (_Mdouble_, _Mdouble_)); -#endif - -#if ((__MATH_DECLARING_DOUBLE \ - && (defined __USE_MISC \ - || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8))) \ - || (!defined __MATH_DECLARE_LDOUBLE && defined __USE_MISC)) \ - && !__MATH_DECLARING_FLOATN -/* scalb. */ -__MATH_REDIRCALL (scalb, , (_Mdouble_, _Mdouble_)); -#endif - -/* sinh. */ -__MATH_REDIRCALL (sinh, , (_Mdouble_)); - -/* sqrt. */ -__MATH_REDIRCALL (sqrt, , (_Mdouble_)); - -#if defined __USE_ISOC99 && defined __extern_always_inline -/* tgamma. */ -extern _Mdouble_ -__REDIRFROM (__gamma, _r_finite) (_Mdouble_, int *); - -__extern_always_inline _Mdouble_ -__NTH (__REDIRFROM (tgamma, ) (_Mdouble_ __d)) -{ - int __local_signgam = 0; - _Mdouble_ __res = __REDIRTO (gamma, _r) (__d, &__local_signgam); - return __local_signgam < 0 ? -__res : __res; -} -#endif - -#undef __REDIRFROM -#undef __REDIRTO -#undef __MATH_REDIRCALL -#undef __MATH_REDIRCALL_2 -#undef __MATH_REDIRCALL_INTERNAL -#undef __MATH_REDIRCALL_X diff --git a/math/Makefile b/math/Makefile index 4c7e77e..7eba7a0 100644 --- a/math/Makefile +++ b/math/Makefile @@ -25,8 +25,7 @@ include ../Makeconfig headers := math.h bits/mathcalls.h bits/mathinline.h \ fpu_control.h complex.h bits/cmathcalls.h fenv.h \ bits/fenv.h bits/fenvinline.h bits/mathdef.h tgmath.h \ - bits/math-finite.h bits/math-vector.h \ - finclude/math-vector-fortran.h \ + bits/math-vector.h finclude/math-vector-fortran.h \ bits/libm-simd-decl-stubs.h bits/iscanonical.h \ bits/flt-eval-method.h bits/fp-fast.h bits/fp-logb.h \ bits/long-double.h bits/mathcalls-helper-functions.h \ diff --git a/math/math.h b/math/math.h index 4997937..ab76e59 100644 --- a/math/math.h +++ b/math/math.h @@ -1245,226 +1245,6 @@ iszero (__T __val) # include #endif -/* Define special entry points to use when the compiler got told to - only expect finite results. */ -#if defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0 - -/* Include bits/math-finite.h for double. */ -# define _Mdouble_ double -# define __MATH_DECLARING_DOUBLE 1 -# define __MATH_DECLARING_FLOATN 0 -# define __REDIRFROM_X(function, reentrant) \ - function ## reentrant -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## reentrant ## _finite -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X - -/* When __USE_ISOC99 is defined, include math-finite for float and - long double, as well. */ -# ifdef __USE_ISOC99 - -/* Include bits/math-finite.h for float. */ -# define _Mdouble_ float -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 0 -# define __REDIRFROM_X(function, reentrant) \ - function ## f ## reentrant -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f ## reentrant ## _finite -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X - -/* Include bits/math-finite.h for long double. */ -# ifdef __MATH_DECLARE_LDOUBLE -# define _Mdouble_ long double -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 0 -# define __REDIRFROM_X(function, reentrant) \ - function ## l ## reentrant -# ifdef __NO_LONG_DOUBLE_MATH -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## l ## reentrant ## _finite -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# endif /* __USE_ISOC99. */ - -/* Include bits/math-finite.h for _FloatN and _FloatNx. */ - -# if (__HAVE_DISTINCT_FLOAT16 || (__HAVE_FLOAT16 && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float16 -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f16 ## reentrant -# if __HAVE_DISTINCT_FLOAT16 -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f16 ## reentrant ## _finite -# else -# error "non-disinct _Float16" -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT32 || (__HAVE_FLOAT32 && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float32 -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f32 ## reentrant -# if __HAVE_DISTINCT_FLOAT32 -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f32 ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f ## reentrant ## _finite -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT64 || (__HAVE_FLOAT64 && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float64 -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f64 ## reentrant -# if __HAVE_DISTINCT_FLOAT64 -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f64 ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## reentrant ## _finite -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float128 -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f128 ## reentrant -# if __HAVE_DISTINCT_FLOAT128 -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f128 ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## l ## reentrant ## _finite -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT32X || (__HAVE_FLOAT32X && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float32x -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f32x ## reentrant -# if __HAVE_DISTINCT_FLOAT32X -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f32x ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## reentrant ## _finite -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT64X || (__HAVE_FLOAT64X && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float64x -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f64x ## reentrant -# if __HAVE_DISTINCT_FLOAT64X -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f64x ## reentrant ## _finite -# elif __HAVE_FLOAT64X_LONG_DOUBLE -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## l ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f128 ## reentrant ## _finite -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float128x -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f128x ## reentrant -# if __HAVE_DISTINCT_FLOAT128X -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f128x ## reentrant ## _finite -# else -# error "non-disinct _Float128x" -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -#endif /* __FINITE_MATH_ONLY__ > 0. */ #if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* An expression whose type has the widest of the evaluation formats diff --git a/sysdeps/ia64/fpu/bits/math-finite.h b/sysdeps/ia64/fpu/bits/math-finite.h deleted file mode 100644 index 05b7dd4..0000000 --- a/sysdeps/ia64/fpu/bits/math-finite.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Entry points to finite-math-only compiler runs. - Copyright (C) 2011-2019 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _MATH_H -# error "Never use directly; include instead." -#endif - -/* Nothing can be done for IA-64 since the math functions differ in their - structure. */