math: Remove mpa files [BZ #15267]

Finally remove all mpa related files, headers, declarations, probes, unused
tables and update makefiles.

Reviewed-By: Paul Zimmermann <Paul.Zimmermann@inria.fr>
This commit is contained in:
Wilco Dijkstra 2021-03-10 12:41:47 +00:00 committed by Wilco Dijkstra
parent 4e1a870b9a
commit 47ad14d789
26 changed files with 4 additions and 8099 deletions

View File

@ -16,7 +16,6 @@ arguments.
@menu
* Memory Allocation Probes:: Probes in the memory allocation subsystem
* Mathematical Function Probes:: Probes in mathematical functions
* Non-local Goto Probes:: Probes in setjmp and longjmp
@end menu
@ -255,90 +254,6 @@ is the memory location as passed to @code{free}, Argument @var{$arg2}
is the tcache bin it resides in.
@end deftp
@node Mathematical Function Probes
@section Mathematical Function Probes
Some mathematical functions fall back to multiple precision arithmetic for
some inputs to get last bit precision for their return values. This multiple
precision fallback is much slower than the default algorithms and may have a
significant impact on application performance. The systemtap probe markers
described in this section may help you determine if your application calls
mathematical functions with inputs that may result in multiple-precision
arithmetic.
Unless explicitly mentioned otherwise, a precision of 1 implies 24 bits of
precision in the mantissa of the multiple precision number. Hence, a precision
level of 32 implies 768 bits of precision in the mantissa.
@deftp Probe slowatan2 (int @var{$arg1}, double @var{$arg2}, double @var{$arg3}, double @var{$arg4})
This probe is triggered when the @code{atan2} function is called with
an input that results in multiple precision computation. Argument
@var{$arg1} is the precision with which computation succeeded.
Arguments @var{$arg2} and @var{$arg3} are inputs to the @code{atan2}
function and @var{$arg4} is the computed result.
@end deftp
@deftp Probe slowatan2_inexact (int @var{$arg1}, double @var{$arg2}, double @var{$arg3}, double @var{$arg4})
This probe is triggered when the @code{atan} function is called with
an input that results in multiple precision computation and none of
the multiple precision computations result in an accurate result.
Argument @var{$arg1} is the maximum precision with which computations
were performed. Arguments @var{$arg2} and @var{$arg3} are inputs to
the @code{atan2} function and @var{$arg4} is the computed result.
@end deftp
@deftp Probe slowatan (int @var{$arg1}, double @var{$arg2}, double @var{$arg3})
This probe is triggered when the @code{atan} function is called with
an input that results in multiple precision computation. Argument
@var{$arg1} is the precision with which computation succeeded.
Argument @var{$arg2} is the input to the @code{atan} function and
@var{$arg3} is the computed result.
@end deftp
@deftp Probe slowatan_inexact (int @var{$arg1}, double @var{$arg2}, double @var{$arg3})
This probe is triggered when the @code{atan} function is called with
an input that results in multiple precision computation and none of
the multiple precision computations result in an accurate result.
Argument @var{$arg1} is the maximum precision with which computations
were performed. Argument @var{$arg2} is the input to the @code{atan}
function and @var{$arg3} is the computed result.
@end deftp
@deftp Probe slowtan (double @var{$arg1}, double @var{$arg2})
This probe is triggered when the @code{tan} function is called with an
input that results in multiple precision computation with precision
32. Argument @var{$arg1} is the input to the function and @var{$arg2}
is the computed result.
@end deftp
@deftp Probe slowsin (double @var{$arg1}, double @var{$arg2})
This probe is triggered when the @code{sin} function is called with an
input that results in multiple precision computation with precision
32. Argument @var{$arg1} is the input to the function and @var{$arg2}
is the computed result.
@end deftp
@deftp Probe slowcos (double @var{$arg1}, double @var{$arg2})
This probe is triggered when the @code{cos} function is called with an
input that results in multiple precision computation with precision
32. Argument @var{$arg1} is the input to the function and @var{$arg2}
is the computed result.
@end deftp
@deftp Probe slowsin_dx (double @var{$arg1}, double @var{$arg2}, double @var{$arg3})
This probe is triggered when the @code{sin} function is called with an
input that results in multiple precision computation with precision
32. Argument @var{$arg1} is the input to the function, @var{$arg2} is
the error bound of @var{$arg1} and @var{$arg3} is the computed result.
@end deftp
@deftp Probe slowcos_dx (double @var{$arg1}, double @var{$arg2}, double @var{$arg3})
This probe is triggered when the @code{cos} function is called with an
input that results in multiple precision computation with precision
32. Argument @var{$arg1} is the input to the function, @var{$arg2} is
the error bound of @var{$arg1} and @var{$arg3} is the computed result.
@end deftp
@node Non-local Goto Probes
@section Non-local Goto Probes

View File

@ -126,8 +126,7 @@ type-ldouble-yes := ldouble
# double support
type-double-suffix :=
type-double-routines := branred doasin dosincos mpa mpatan2 \
k_rem_pio2 mpatan mpsqrt mptan sincos32 \
type-double-routines := branred k_rem_pio2 \
sincostab math_err e_exp_data e_log_data \
e_log2_data e_pow_log_data

View File

@ -199,11 +199,5 @@ do { \
extern double __sin (double __x);
extern double __cos (double __x);
extern int __branred (double __x, double *__a, double *__aa);
extern void __doasin (double __x, double __dx, double __v[]);
extern void __dubsin (double __x, double __dx, double __v[]);
extern void __dubcos (double __x, double __dx, double __v[]);
extern double __mpsin (double __x, double __dx, bool __range_reduce);
extern double __mpcos (double __x, double __dx, bool __range_reduce);
extern void __docos (double __x, double __dx, double __v[]);
#endif /* _MATH_PRIVATE_H_ */

View File

@ -1,100 +0,0 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
* Copyright (C) 2001-2021 Free Software Foundation, Inc.
*
* This program 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.
*
* This program 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 this program; if not, see <https://www.gnu.org/licenses/>.
*/
/********************************************************************/
/* Ultimate math functions. Each function computes the exact */
/* theoretical value of its argument rounded to nearest or even. */
/* */
/* Assumption: Machine arithmetic operations are performed in */
/* round nearest mode of IEEE 754 standard. */
/********************************************************************/
#ifndef UMATH_LIB
#define UMATH_LIB
/********************************************************************/
/* Function changes the precision mode to IEEE 754 double precision */
/* and the rounding mode to nearest or even. */
/* It returns the original status of these modes. */
/* See further explanations of usage in DPChange.h */
/********************************************************************/
unsigned short Init_Lib (void);
/********************************************************************/
/* Function that changes the precision and rounding modes to the */
/* specified by the argument received. See further explanations in */
/* DPChange.h */
/********************************************************************/
void Exit_Lib (unsigned short);
/* The asin() function calculates the arc sine of its argument. */
/* The function returns the arc sine in radians */
/* (between -PI/2 and PI/2). */
/* If the argument is greater than 1 or less than -1 it returns */
/* a NaN. */
double uasin (double);
/* The acos() function calculates the arc cosine of its argument. */
/* The function returns the arc cosine in radians */
/* (between -PI/2 and PI/2). */
/* If the argument is greater than 1 or less than -1 it returns */
/* a NaN. */
double uacos (double);
/* The atan() function calculates the arctanget of its argument. */
/* The function returns the arc tangent in radians */
/* (between -PI/2 and PI/2). */
double uatan (double);
/* The uatan2() function calculates the arc tangent of the two arguments x */
/* and y (x is the right argument and y is the left one).The signs of both */
/* arguments are used to determine the quadrant of the result. */
/* The function returns the result in radians, which is between -PI and PI */
double uatan2 (double, double);
/* Compute log(x). The base of log is e (natural logarithm) */
double ulog (double);
/* Compute e raised to the power of argument x. */
double uexp (double);
/* Compute sin(x). The argument x is assumed to be given in radians.*/
double usin (double);
/* Compute cos(x). The argument x is assumed to be given in radians.*/
double ucos (double);
/* Compute tan(x). The argument x is assumed to be given in radians.*/
double utan (double);
/* Compute the square root of non-negative argument x. */
/* If x is negative the returned value is NaN. */
double usqrt (double);
/* Compute x raised to the power of y, where x is the left argument */
/* and y is the right argument. The function returns a NaN if x<0. */
/* If x equals zero it returns -inf */
double upow (double, double);
/* Computing x mod y, where x is the left argument and y is the */
/* right one. */
double uremainder (double, double);
#endif

View File

@ -32,7 +32,6 @@
#include "endian.h"
#include "mydefs.h"
#include "urem.h"
#include "MathLib.h"
#include <math.h>
#include <math_private.h>
#include <fenv_private.h>

View File

@ -35,7 +35,6 @@
#include "endian.h"
#include "mydefs.h"
#include <dla.h>
#include "MathLib.h"
#include "root.tbl"
#include <math-barriers.h>
#include <math_private.h>

View File

@ -38,7 +38,6 @@
#include "endian.h"
#include "mydefs.h"
#include "usncs.h"
#include "MathLib.h"
#include <math.h>
#include <math_private.h>
#include <fenv_private.h>

File diff suppressed because it is too large Load Diff

View File

@ -9,25 +9,14 @@ libm-sysdep_routines += s_ceil-sse4_1 s_ceilf-sse4_1 s_floor-sse4_1 \
s_trunc-sse4_1 s_truncf-sse4_1
libm-sysdep_routines += e_exp-fma e_log-fma e_pow-fma s_atan-fma \
e_asin-fma e_atan2-fma s_sin-fma s_tan-fma \
mpa-fma \
sincos32-fma doasin-fma dosincos-fma \
mpatan2-fma mpatan-fma mpsqrt-fma mptan-fma
e_asin-fma e_atan2-fma s_sin-fma s_tan-fma
CFLAGS-doasin-fma.c = -mfma -mavx2
CFLAGS-dosincos-fma.c = -mfma -mavx2
CFLAGS-e_asin-fma.c = -mfma -mavx2
CFLAGS-e_atan2-fma.c = -mfma -mavx2
CFLAGS-e_exp-fma.c = -mfma -mavx2
CFLAGS-e_log-fma.c = -mfma -mavx2
CFLAGS-e_pow-fma.c = -mfma -mavx2
CFLAGS-mpa-fma.c = -mfma -mavx2
CFLAGS-mpatan-fma.c = -mfma -mavx2
CFLAGS-mpatan2-fma.c = -mfma -mavx2
CFLAGS-mpsqrt-fma.c = -mfma -mavx2
CFLAGS-mptan-fma.c = -mfma -mavx2
CFLAGS-s_atan-fma.c = -mfma -mavx2
CFLAGS-sincos32-fma.c = -mfma -mavx2
CFLAGS-s_sin-fma.c = -mfma -mavx2
CFLAGS-s_tan-fma.c = -mfma -mavx2
@ -46,36 +35,23 @@ CFLAGS-s_cosf-fma.c = -mfma -mavx2
CFLAGS-s_sincosf-fma.c = -mfma -mavx2
libm-sysdep_routines += e_exp-fma4 e_log-fma4 e_pow-fma4 s_atan-fma4 \
e_asin-fma4 e_atan2-fma4 s_sin-fma4 s_tan-fma4 \
mpa-fma4 \
sincos32-fma4 doasin-fma4 dosincos-fma4 \
mpatan2-fma4 mpatan-fma4 mpsqrt-fma4 mptan-fma4
e_asin-fma4 e_atan2-fma4 s_sin-fma4 s_tan-fma4
CFLAGS-doasin-fma4.c = -mfma4
CFLAGS-dosincos-fma4.c = -mfma4
CFLAGS-e_asin-fma4.c = -mfma4
CFLAGS-e_atan2-fma4.c = -mfma4
CFLAGS-e_exp-fma4.c = -mfma4
CFLAGS-e_log-fma4.c = -mfma4
CFLAGS-e_pow-fma4.c = -mfma4
CFLAGS-mpa-fma4.c = -mfma4
CFLAGS-mpatan-fma4.c = -mfma4
CFLAGS-mpatan2-fma4.c = -mfma4
CFLAGS-mpsqrt-fma4.c = -mfma4
CFLAGS-mptan-fma4.c = -mfma4
CFLAGS-s_atan-fma4.c = -mfma4
CFLAGS-sincos32-fma4.c = -mfma4
CFLAGS-s_sin-fma4.c = -mfma4
CFLAGS-s_tan-fma4.c = -mfma4
libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
e_atan2-avx s_sin-avx s_tan-avx \
mpa-avx
e_atan2-avx s_sin-avx s_tan-avx
CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
CFLAGS-mpa-avx.c = -msse2avx -DSSE2AVX
CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX

View File

@ -1,4 +0,0 @@
#define __doasin __doasin_fma
#define SECTION __attribute__ ((section (".text.fma")))
#include <sysdeps/ieee754/dbl-64/doasin.c>

View File

@ -1,4 +0,0 @@
#define __doasin __doasin_fma4
#define SECTION __attribute__ ((section (".text.fma4")))
#include <sysdeps/ieee754/dbl-64/doasin.c>

View File

@ -1,6 +0,0 @@
#define __docos __docos_fma
#define __dubcos __dubcos_fma
#define __dubsin __dubsin_fma
#define SECTION __attribute__ ((section (".text.fma")))
#include <sysdeps/ieee754/dbl-64/dosincos.c>

View File

@ -1,6 +0,0 @@
#define __docos __docos_fma4
#define __dubcos __dubcos_fma4
#define __dubsin __dubsin_fma4
#define SECTION __attribute__ ((section (".text.fma4")))
#include <sysdeps/ieee754/dbl-64/dosincos.c>

View File

@ -1,14 +0,0 @@
#define __add __add_avx
#define __mul __mul_avx
#define __sqr __sqr_avx
#define __sub __sub_avx
#define __dbl_mp __dbl_mp_avx
#define __dvd __dvd_avx
#define NO___CPY 1
#define NO___MP_DBL 1
#define NO___ACR 1
#define NO__CONST 1
#define SECTION __attribute__ ((section (".text.avx")))
#include <sysdeps/ieee754/dbl-64/mpa.c>

View File

@ -1,14 +0,0 @@
#define __add __add_fma
#define __mul __mul_fma
#define __sqr __sqr_fma
#define __sub __sub_fma
#define __dbl_mp __dbl_mp_fma
#define __dvd __dvd_fma
#define NO___CPY 1
#define NO___MP_DBL 1
#define NO___ACR 1
#define NO__CONST 1
#define SECTION __attribute__ ((section (".text.fma")))
#include <sysdeps/ieee754/dbl-64/mpa.c>

View File

@ -1,14 +0,0 @@
#define __add __add_fma4
#define __mul __mul_fma4
#define __sqr __sqr_fma4
#define __sub __sub_fma4
#define __dbl_mp __dbl_mp_fma4
#define __dvd __dvd_fma4
#define NO___CPY 1
#define NO___MP_DBL 1
#define NO___ACR 1
#define NO__CONST 1
#define SECTION __attribute__ ((section (".text.fma4")))
#include <sysdeps/ieee754/dbl-64/mpa.c>

View File

@ -1,10 +0,0 @@
#define __mpatan __mpatan_fma
#define __add __add_fma
#define __dvd __dvd_fma
#define __mpsqrt __mpsqrt_fma
#define __mul __mul_fma
#define __sub __sub_fma
#define AVOID_MPATAN_H 1
#define SECTION __attribute__ ((section (".text.fma")))
#include <sysdeps/ieee754/dbl-64/mpatan.c>

View File

@ -1,10 +0,0 @@
#define __mpatan __mpatan_fma4
#define __add __add_fma4
#define __dvd __dvd_fma4
#define __mpsqrt __mpsqrt_fma4
#define __mul __mul_fma4
#define __sub __sub_fma4
#define AVOID_MPATAN_H 1
#define SECTION __attribute__ ((section (".text.fma4")))
#include <sysdeps/ieee754/dbl-64/mpatan.c>

View File

@ -1,9 +0,0 @@
#define __mpatan2 __mpatan2_fma
#define __add __add_fma
#define __dvd __dvd_fma
#define __mpatan __mpatan_fma
#define __mpsqrt __mpsqrt_fma
#define __mul __mul_fma
#define SECTION __attribute__ ((section (".text.fma")))
#include <sysdeps/ieee754/dbl-64/mpatan2.c>

View File

@ -1,9 +0,0 @@
#define __mpatan2 __mpatan2_fma4
#define __add __add_fma4
#define __dvd __dvd_fma4
#define __mpatan __mpatan_fma4
#define __mpsqrt __mpsqrt_fma4
#define __mul __mul_fma4
#define SECTION __attribute__ ((section (".text.fma4")))
#include <sysdeps/ieee754/dbl-64/mpatan2.c>

View File

@ -1,8 +0,0 @@
#define __mpsqrt __mpsqrt_fma
#define __dbl_mp __dbl_mp_fma
#define __mul __mul_fma
#define __sub __sub_fma
#define AVOID_MPSQRT_H 1
#define SECTION __attribute__ ((section (".text.fma")))
#include <sysdeps/ieee754/dbl-64/mpsqrt.c>

View File

@ -1,8 +0,0 @@
#define __mpsqrt __mpsqrt_fma4
#define __dbl_mp __dbl_mp_fma4
#define __mul __mul_fma4
#define __sub __sub_fma4
#define AVOID_MPSQRT_H 1
#define SECTION __attribute__ ((section (".text.fma4")))
#include <sysdeps/ieee754/dbl-64/mpsqrt.c>

View File

@ -1,7 +0,0 @@
#define __mptan __mptan_fma
#define __c32 __c32_fma
#define __dvd __dvd_fma
#define __mpranred __mpranred_fma
#define SECTION __attribute__ ((section (".text.fma")))
#include <sysdeps/ieee754/dbl-64/mptan.c>

View File

@ -1,7 +0,0 @@
#define __mptan __mptan_fma4
#define __c32 __c32_fma4
#define __dvd __dvd_fma4
#define __mpranred __mpranred_fma4
#define SECTION __attribute__ ((section (".text.fma4")))
#include <sysdeps/ieee754/dbl-64/mptan.c>

View File

@ -1,13 +0,0 @@
#define __c32 __c32_fma
#define __mpsin __mpsin_fma
#define __mpsin1 __mpsin1_fma
#define __mpcos __mpcos_fma
#define __mpcos1 __mpcos1_fma
#define __mpranred __mpranred_fma
#define __add __add_fma
#define __dbl_mp __dbl_mp_fma
#define __mul __mul_fma
#define __sub __sub_fma
#define SECTION __attribute__ ((section (".text.fma")))
#include <sysdeps/ieee754/dbl-64/sincos32.c>

View File

@ -1,13 +0,0 @@
#define __c32 __c32_fma4
#define __mpsin __mpsin_fma4
#define __mpsin1 __mpsin1_fma4
#define __mpcos __mpcos_fma4
#define __mpcos1 __mpcos1_fma4
#define __mpranred __mpranred_fma4
#define __add __add_fma4
#define __dbl_mp __dbl_mp_fma4
#define __mul __mul_fma4
#define __sub __sub_fma4
#define SECTION __attribute__ ((section (".text.fma4")))
#include <sysdeps/ieee754/dbl-64/sincos32.c>