@@ -26,7 +26,7 @@
/* checkint */
/* FILES NEEDED: dla.h endian.h mpa.h mydefs.h */
/* halfulp.c mpexp.c mplog.c slowexp.c slowpow.c mpa.c */
-/* uexp.c upow.c */
+/* uexp.c upow.c */
/* root.tbl uexp.tbl upow.tbl */
/* An ultimate power routine. Given two IEEE double machine numbers y,x */
/* it computes the correctly rounded (to nearest) value of x^y. */
@@ -27,7 +27,11 @@ libm-sysdep_routines += s_isnan-power7 s_isnan-power6x s_isnan-power6 \
s_llrint-power8 s_llround-power8 s_llroundf-ppc64 \
e_expf-power8 e_expf-ppc64 \
s_sinf-ppc64 s_sinf-power8 \
- s_cosf-ppc64 s_cosf-power8
+ s_cosf-ppc64 s_cosf-power8 \
+ slowpow-power7 slowpow-power8 slowpow-power9 slowpow-ppc64 \
+ e_pow-power7 e_pow-power8 e_pow-power9 e_pow-ppc64 \
+ slowexp-power7 slowexp-power8 slowexp-power9 slowexp-ppc64 \
+ e_exp-power7 e_exp-power8 e_exp-power9 e_exp-ppc64
CFLAGS-s_logbf-power7.c = -mcpu=power7
CFLAGS-s_logbl-power7.c = -mcpu=power7
@@ -36,6 +40,18 @@ CFLAGS-s_modf-power5+.c = -mcpu=power5+
CFLAGS-s_modff-power5+.c = -mcpu=power5+
CFLAGS-e_hypot-power7.c = -mcpu=power7
CFLAGS-e_hypotf-power7.c = -mcpu=power7
+CFLAGS-slowpow-power7.c = -mcpu=power7
+CFLAGS-slowpow-power8.c = -mcpu=power8
+CFLAGS-slowpow-power9.c = -mcpu=power9
+CFLAGS-e_pow-power7.c = -mcpu=power7
+CFLAGS-e_pow-power8.c = -mcpu=power8
+CFLAGS-e_pow-power9.c = -mcpu=power9
+CFLAGS-slowexp-power7.c = -mcpu=power7
+CFLAGS-slowexp-power8.c = -mcpu=power8
+CFLAGS-slowexp-power9.c = -mcpu=power9
+CFLAGS-e_exp-power7.c = -mcpu=power7
+CFLAGS-e_exp-power8.c = -mcpu=power8
+CFLAGS-e_exp-power9.c = -mcpu=power9
# These files quiet sNaNs in a way that is optimized away without
# -fsignaling-nans.
new file mode 100644
@@ -0,0 +1,28 @@
+/* __ieee_exp() POWER7 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __ieee754_exp __ieee754_exp_power7
+#define __exp1 __exp1_power7
+#define __slowexp __slowexp_power7
+#define SECTION __attribute__ ((section (".text.power7")))
+
+#include <sysdeps/ieee754/dbl-64/e_exp.c>
new file mode 100644
@@ -0,0 +1,28 @@
+/* __ieee_exp() POWER8 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __ieee754_exp __ieee754_exp_power8
+#define __exp1 __exp1_power8
+#define __slowexp __slowexp_power8
+#define SECTION __attribute__ ((section (".text.power8")))
+
+#include <sysdeps/ieee754/dbl-64/e_exp.c>
new file mode 100644
@@ -0,0 +1,28 @@
+/* __ieee_exp() POWER9 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __ieee754_exp __ieee754_exp_power9
+#define __exp1 __exp1_power9
+#define __slowexp __slowexp_power9
+#define SECTION __attribute__ ((section (".text.power9")))
+
+#include <sysdeps/ieee754/dbl-64/e_exp.c>
new file mode 100644
@@ -0,0 +1,26 @@
+/* __ieee_pow() PowerPC64 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __ieee754_exp __ieee754_exp_ppc64
+#define __exp1 __exp1_ppc64
+#define __slowexp __slowexp_ppc64
+
+#include <sysdeps/ieee754/dbl-64/e_exp.c>
new file mode 100644
@@ -0,0 +1,37 @@
+/* Multiple versions of ieee754_exp.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <math_ldbl_opt.h>
+#include "init-arch.h"
+
+extern __typeof (__ieee754_exp) __ieee754_exp_ppc64 attribute_hidden;
+extern __typeof (__ieee754_exp) __ieee754_exp_power7 attribute_hidden;
+extern __typeof (__ieee754_exp) __ieee754_exp_power8 attribute_hidden;
+extern __typeof (__ieee754_exp) __ieee754_exp_power9 attribute_hidden;
+
+libc_ifunc (__ieee754_exp,
+ (hwcap2 & PPC_FEATURE2_ARCH_3_00)
+ ? __ieee754_exp_power9
+ : (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __ieee754_exp_power8
+ : (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __ieee754_exp_power7
+ : __ieee754_exp_ppc64);
+
+strong_alias (__ieee754_exp, __exp_finite)
new file mode 100644
@@ -0,0 +1,28 @@
+/* __ieee_pow() POWER7 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __ieee754_pow __ieee754_pow_power7
+#define __exp1 __exp1_power7
+#define __slowpow __slowpow_power7
+#define SECTION __attribute__ ((section (".text.power7")))
+
+#include <sysdeps/ieee754/dbl-64/e_pow.c>
new file mode 100644
@@ -0,0 +1,28 @@
+/* __ieee_pow() POWER8 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __ieee754_pow __ieee754_pow_power8
+#define __exp1 __exp1_power8
+#define __slowpow __slowpow_power8
+#define SECTION __attribute__ ((section (".text.power8")))
+
+#include <sysdeps/ieee754/dbl-64/e_pow.c>
new file mode 100644
@@ -0,0 +1,28 @@
+/* __ieee_pow() POWER9 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __ieee754_pow __ieee754_pow_power9
+#define __exp1 __exp1_power9
+#define __slowpow __slowpow_power9
+#define SECTION __attribute__ ((section (".text.power9")))
+
+#include <sysdeps/ieee754/dbl-64/e_pow.c>
new file mode 100644
@@ -0,0 +1,26 @@
+/* __ieee_pow() PowerPC64 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __ieee754_pow __ieee754_pow_ppc64
+#define __exp1 __exp1_ppc64
+#define __slowpow __slowpow_ppc64
+
+#include <sysdeps/ieee754/dbl-64/e_pow.c>
new file mode 100644
@@ -0,0 +1,37 @@
+/* Multiple versions of ieee754_pow.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <math_ldbl_opt.h>
+#include "init-arch.h"
+
+extern __typeof (__ieee754_pow) __ieee754_pow_ppc64 attribute_hidden;
+extern __typeof (__ieee754_pow) __ieee754_pow_power7 attribute_hidden;
+extern __typeof (__ieee754_pow) __ieee754_pow_power8 attribute_hidden;
+extern __typeof (__ieee754_pow) __ieee754_pow_power9 attribute_hidden;
+
+libc_ifunc (__ieee754_pow,
+ (hwcap2 & PPC_FEATURE2_ARCH_3_00)
+ ? __ieee754_pow_power9
+ : (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __ieee754_pow_power8
+ : (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __ieee754_pow_power7
+ : __ieee754_pow_ppc64);
+
+strong_alias (__ieee754_pow, __pow_finite)
new file mode 100644
@@ -0,0 +1,26 @@
+/* __slowexp() POWER7 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __slowexp __slowexp_power7
+#define SECTION __attribute__ ((section (".text.power7")))
+
+#include <sysdeps/ieee754/dbl-64/slowexp.c>
new file mode 100644
@@ -0,0 +1,26 @@
+/* __slowexp() POWER8 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __slowexp __slowexp_power8
+#define SECTION __attribute__ ((section (".text.power8")))
+
+#include <sysdeps/ieee754/dbl-64/slowexp.c>
new file mode 100644
@@ -0,0 +1,26 @@
+/* __slowexp() POWER9 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __slowexp __slowexp_power9
+#define SECTION __attribute__ ((section (".text.power9")))
+
+#include <sysdeps/ieee754/dbl-64/slowexp.c>
new file mode 100644
@@ -0,0 +1,24 @@
+/* __slowexp() PowerPC64 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __slowexp __slowexp_ppc64
+
+#include <sysdeps/ieee754/dbl-64/slowexp.c>
new file mode 100644
@@ -0,0 +1,26 @@
+/* __slowpow() POWER7 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __slowpow __slowpow_power7
+#define SECTION __attribute__ ((section (".text.power7")))
+
+#include <sysdeps/ieee754/dbl-64/slowpow.c>
new file mode 100644
@@ -0,0 +1,26 @@
+/* __slowpow() POWER8 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __slowpow __slowpow_power8
+#define SECTION __attribute__ ((section (".text.power8")))
+
+#include <sysdeps/ieee754/dbl-64/slowpow.c>
new file mode 100644
@@ -0,0 +1,26 @@
+/* __slowpow() POWER9 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __slowpow __slowpow_power9
+#define SECTION __attribute__ ((section (".text.power9")))
+
+#include <sysdeps/ieee754/dbl-64/slowpow.c>
new file mode 100644
@@ -0,0 +1,24 @@
+/* __slowpow() PowerPC64 version.
+ Copyright (C) 2017 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
+ <http://www.gnu.org/licenses/>. */
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __slowpow __slowpow_ppc64
+
+#include <sysdeps/ieee754/dbl-64/slowpow.c>