@@ -24,7 +24,9 @@ libm-sysdep_routines += s_isnan-power7 s_isnan-power6x s_isnan-power6 \
s_modff-power5+ s_modff-ppc64 e_hypot-ppc64 \
e_hypot-power7 e_hypotf-ppc64 e_hypotf-power7 \
s_isnan-power8 s_isinf-power8 s_finite-power8 \
- s_llrint-power8 s_llround-power8
+ s_llrint-power8 s_llround-power8 \
+ e_fmod-power8 e_fmodf-power8 e_fmod-ppc64 \
+ e_fmodf-ppc64
CFLAGS-s_logbf-power7.c = -mcpu=power7
CFLAGS-s_logbl-power7.c = -mcpu=power7
new file mode 100644
@@ -0,0 +1,26 @@
+/* __ieee754_fmod POWER8 version.
+ Copyright (C) 2014 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 <sysdep.h>
+
+#undef strong_alias
+#define strong_alias(name, alias)
+
+#define __ieee754_fmod __ieee754_fmod_power8
+
+#include <sysdeps/powerpc/powerpc64/power8/fpu/e_fmod.S>
new file mode 100644
@@ -0,0 +1,26 @@
+/* __ieee754_fmod PowerPC64 version.
+ Copyright (C) 2013-2014 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>
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __ieee754_fmod __ieee754_fmod_ppc64
+
+#include <sysdeps/ieee754/dbl-64/wordsize-64/e_fmod.c>
new file mode 100644
@@ -0,0 +1,31 @@
+/* Multiple versions of ieee754_fmod.
+ Copyright (C) 2013-2014 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_private.h>
+#include "init-arch.h"
+
+extern __typeof (__ieee754_fmod) __ieee754_fmod_ppc64 attribute_hidden;
+extern __typeof (__ieee754_fmod) __ieee754_fmod_power8 attribute_hidden;
+
+libc_ifunc (__ieee754_fmod,
+ (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __ieee754_fmod_power8
+ : __ieee754_fmod_ppc64);
+
+strong_alias (__ieee754_fmod, __fmod_finite)
new file mode 100644
@@ -0,0 +1,26 @@
+/* __ieee_fmodf POWER8 version.
+ Copyright (C) 2014 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 <sysdep.h>
+
+#undef strong_alias
+#define strong_alias(name, alias)
+
+#define __ieee754_fmodf __ieee754_fmodf_power8
+
+#include <sysdeps/powerpc/powerpc64/power8/fpu/e_fmodf.S>
new file mode 100644
@@ -0,0 +1,26 @@
+/* __ieee754_fmodf PowerPC64 version.
+ Copyright (C) 2013-2014 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>
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __ieee754_fmodf __ieee754_fmodf_ppc64
+
+#include <sysdeps/ieee754/flt-32/e_fmodf.c>
new file mode 100644
@@ -0,0 +1,31 @@
+/* Multiple versions of ieee754_fmodf.
+ Copyright (C) 2013-2014 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_private.h>
+#include "init-arch.h"
+
+extern __typeof (__ieee754_fmodf) __ieee754_fmodf_ppc64 attribute_hidden;
+extern __typeof (__ieee754_fmodf) __ieee754_fmodf_power8 attribute_hidden;
+
+libc_ifunc (__ieee754_fmodf,
+ (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __ieee754_fmodf_power8
+ : __ieee754_fmodf_ppc64);
+
+strong_alias (__ieee754_fmodf, __fmodf_finite)