Blame SOURCES/glibc-rh731837-23.patch

147e83
From 54c7fb4227e044758021e638082f69d2a48d2658 Mon Sep 17 00:00:00 2001
147e83
From: Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
147e83
Date: Wed, 30 Jul 2014 10:40:10 -0500
147e83
Subject: [PATCH] PowerPC: multiarch isnan/isnanf for PowerPC64
147e83
147e83
commit b2284ad7cf6d9c2fea4223d933fcc152c0fee7c1
147e83
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
147e83
Date:   Fri Dec 13 15:01:10 2013 -0500
147e83
147e83
Added sysdeps/powerpc/powerpc32/fpu/s_isnan.S apart from
147e83
the original commit.
147e83
---
147e83
 sysdeps/powerpc/powerpc32/fpu/s_isnan.S            |  2 +
147e83
 sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile   |  7 +++
147e83
 .../powerpc64/fpu/multiarch/s_isnan-power5.S       | 33 ++++++++++++++
147e83
 .../powerpc64/fpu/multiarch/s_isnan-power6.S       | 33 ++++++++++++++
147e83
 .../powerpc64/fpu/multiarch/s_isnan-power6x.S      | 33 ++++++++++++++
147e83
 .../powerpc64/fpu/multiarch/s_isnan-power7.S       | 33 ++++++++++++++
147e83
 .../powerpc64/fpu/multiarch/s_isnan-ppc64.S        | 32 +++++++++++++
147e83
 sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c  | 53 ++++++++++++++++++++++
147e83
 sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c | 40 ++++++++++++++++
147e83
 9 files changed, 266 insertions(+)
147e83
 create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
147e83
 create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power5.S
147e83
 create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6.S
147e83
 create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6x.S
147e83
 create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power7.S
147e83
 create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-ppc64.S
147e83
 create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c
147e83
 create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c
147e83
147e83
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_isnan.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_isnan.S
147e83
index f1ea473..0157805 100644
147e83
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_isnan.S
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/s_isnan.S
147e83
@@ -37,9 +37,11 @@ weak_alias (__isnan, isnan)
147e83
 
147e83
 /* It turns out that the 'double' version will also always work for
147e83
    single-precision.  */
147e83
+#ifndef __isnan
147e83
 strong_alias (__isnan, __isnanf)
147e83
 hidden_def (__isnanf)
147e83
 weak_alias (__isnanf, isnanf)
147e83
+#endif
147e83
 
147e83
 #ifdef NO_LONG_DOUBLE
147e83
 strong_alias (__isnan, __isnanl)
147e83
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
147e83
new file mode 100644
147e83
index 0000000..b57ddc9
147e83
--- /dev/null
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
147e83
@@ -0,0 +1,7 @@
147e83
+ifeq ($(subdir),math)
147e83
+sysdep_routines += s_isnan-power7 s_isnan-power6x s_isnan-power6 \
147e83
+                  s_isnan-power5 s_isnan-ppc64
147e83
+
147e83
+libm-sysdep_routines += s_isnan-power7 s_isnan-power6x s_isnan-power6 \
147e83
+                       s_isnan-power5 s_isnan-ppc64
147e83
+endif
147e83
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power5.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power5.S
147e83
new file mode 100644
147e83
index 0000000..145e24b
147e83
--- /dev/null
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power5.S
147e83
@@ -0,0 +1,33 @@
147e83
+/* isnan().  PowerPC64/POWER5 version.
147e83
+   Copyright (C) 2013-2014 Free Software Foundation, Inc.
147e83
+   This file is part of the GNU C Library.
147e83
+
147e83
+   The GNU C Library is free software; you can redistribute it and/or
147e83
+   modify it under the terms of the GNU Lesser General Public
147e83
+   License as published by the Free Software Foundation; either
147e83
+   version 2.1 of the License, or (at your option) any later version.
147e83
+
147e83
+   The GNU C Library is distributed in the hope that it will be useful,
147e83
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
+   Lesser General Public License for more details.
147e83
+
147e83
+   You should have received a copy of the GNU Lesser General Public
147e83
+   License along with the GNU C Library; if not, see
147e83
+   <http://www.gnu.org/licenses/>.  */
147e83
+
147e83
+#include <sysdep.h>
147e83
+#include <math_ldbl_opt.h>
147e83
+
147e83
+#undef hidden_def
147e83
+#define hidden_def(name)
147e83
+#undef weak_alias
147e83
+#define weak_alias(name, alias)
147e83
+#undef strong_alias
147e83
+#define strong_alias(name, alias)
147e83
+#undef compat_symbol
147e83
+#define compat_symbol(lib, name, symbol, ver)
147e83
+
147e83
+#define __isnan __isnan_power5
147e83
+
147e83
+#include <sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S>
147e83
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6.S
147e83
new file mode 100644
147e83
index 0000000..4576eb3
147e83
--- /dev/null
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6.S
147e83
@@ -0,0 +1,33 @@
147e83
+/* isnan().  PowerPC64/POWER6 version.
147e83
+   Copyright (C) 2013-2014 Free Software Foundation, Inc.
147e83
+   This file is part of the GNU C Library.
147e83
+
147e83
+   The GNU C Library is free software; you can redistribute it and/or
147e83
+   modify it under the terms of the GNU Lesser General Public
147e83
+   License as published by the Free Software Foundation; either
147e83
+   version 2.1 of the License, or (at your option) any later version.
147e83
+
147e83
+   The GNU C Library is distributed in the hope that it will be useful,
147e83
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
+   Lesser General Public License for more details.
147e83
+
147e83
+   You should have received a copy of the GNU Lesser General Public
147e83
+   License along with the GNU C Library; if not, see
147e83
+   <http://www.gnu.org/licenses/>.  */
147e83
+
147e83
+#include <sysdep.h>
147e83
+#include <math_ldbl_opt.h>
147e83
+
147e83
+#undef hidden_def
147e83
+#define hidden_def(name)
147e83
+#undef weak_alias
147e83
+#define weak_alias(name, alias)
147e83
+#undef strong_alias
147e83
+#define strong_alias(name, alias)
147e83
+#undef compat_symbol
147e83
+#define compat_symbol(lib, name, symbol, ver)
147e83
+
147e83
+#define __isnan __isnan_power6
147e83
+
147e83
+#include <sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S>
147e83
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6x.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6x.S
147e83
new file mode 100644
147e83
index 0000000..c2a45e3
147e83
--- /dev/null
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6x.S
147e83
@@ -0,0 +1,33 @@
147e83
+/* isnan().  PowerPC64/POWER6X version.
147e83
+   Copyright (C) 2013-2014 Free Software Foundation, Inc.
147e83
+   This file is part of the GNU C Library.
147e83
+
147e83
+   The GNU C Library is free software; you can redistribute it and/or
147e83
+   modify it under the terms of the GNU Lesser General Public
147e83
+   License as published by the Free Software Foundation; either
147e83
+   version 2.1 of the License, or (at your option) any later version.
147e83
+
147e83
+   The GNU C Library is distributed in the hope that it will be useful,
147e83
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
+   Lesser General Public License for more details.
147e83
+
147e83
+   You should have received a copy of the GNU Lesser General Public
147e83
+   License along with the GNU C Library; if not, see
147e83
+   <http://www.gnu.org/licenses/>.  */
147e83
+
147e83
+#include <sysdep.h>
147e83
+#include <math_ldbl_opt.h>
147e83
+
147e83
+#undef hidden_def
147e83
+#define hidden_def(name)
147e83
+#undef weak_alias
147e83
+#define weak_alias(name, alias)
147e83
+#undef strong_alias
147e83
+#define strong_alias(name, alias)
147e83
+#undef compat_symbol
147e83
+#define compat_symbol(lib, name, symbol, ver)
147e83
+
147e83
+#define __isnan __isnan_power6x
147e83
+
147e83
+#include <sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S>
147e83
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power7.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power7.S
147e83
new file mode 100644
147e83
index 0000000..05b9fbc
147e83
--- /dev/null
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power7.S
147e83
@@ -0,0 +1,33 @@
147e83
+/* isnan().  PowerPC64/POWER7 version.
147e83
+   Copyright (C) 2013-2014 Free Software Foundation, Inc.
147e83
+   This file is part of the GNU C Library.
147e83
+
147e83
+   The GNU C Library is free software; you can redistribute it and/or
147e83
+   modify it under the terms of the GNU Lesser General Public
147e83
+   License as published by the Free Software Foundation; either
147e83
+   version 2.1 of the License, or (at your option) any later version.
147e83
+
147e83
+   The GNU C Library is distributed in the hope that it will be useful,
147e83
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
+   Lesser General Public License for more details.
147e83
+
147e83
+   You should have received a copy of the GNU Lesser General Public
147e83
+   License along with the GNU C Library; if not, see
147e83
+   <http://www.gnu.org/licenses/>.  */
147e83
+
147e83
+#include <sysdep.h>
147e83
+#include <math_ldbl_opt.h>
147e83
+
147e83
+#undef hidden_def
147e83
+#define hidden_def(name)
147e83
+#undef weak_alias
147e83
+#define weak_alias(name, alias)
147e83
+#undef strong_alias
147e83
+#define strong_alias(name, alias)
147e83
+#undef compat_symbol
147e83
+#define compat_symbol(lib, name, symbol, ver)
147e83
+
147e83
+#define __isnan __isnan_power7
147e83
+
147e83
+#include <sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S>
147e83
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-ppc64.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-ppc64.S
147e83
new file mode 100644
147e83
index 0000000..cf01d64
147e83
--- /dev/null
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-ppc64.S
147e83
@@ -0,0 +1,32 @@
147e83
+/* isnan().  PowerPC32 default version.
147e83
+   Copyright (C) 2013-2014 Free Software Foundation, Inc.
147e83
+   This file is part of the GNU C Library.
147e83
+
147e83
+   The GNU C Library is free software; you can redistribute it and/or
147e83
+   modify it under the terms of the GNU Lesser General Public
147e83
+   License as published by the Free Software Foundation; either
147e83
+   version 2.1 of the License, or (at your option) any later version.
147e83
+
147e83
+   The GNU C Library is distributed in the hope that it will be useful,
147e83
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
+   Lesser General Public License for more details.
147e83
+
147e83
+   You should have received a copy of the GNU Lesser General Public
147e83
+   License along with the GNU C Library; if not, see
147e83
+   <http://www.gnu.org/licenses/>.  */
147e83
+
147e83
+#include <sysdep.h>
147e83
+#include <math_ldbl_opt.h>
147e83
+
147e83
+#undef weak_alias
147e83
+#define weak_alias(a,b)
147e83
+#undef strong_alias
147e83
+#define strong_alias(a,b)
147e83
+
147e83
+#define __isnan __isnan_ppc64
147e83
+#undef hidden_def
147e83
+#define hidden_def(name) \
147e83
+  .globl __GI___isnan ; .set __GI___isnan,__isnan_ppc64
147e83
+
147e83
+#include <sysdeps/powerpc/powerpc64/fpu/s_isnan.S>
147e83
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c
147e83
new file mode 100644
147e83
index 0000000..0de833e
147e83
--- /dev/null
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c
147e83
@@ -0,0 +1,53 @@
147e83
+/* Multiple versions of isnan.
147e83
+   Copyright (C) 2013-2014 Free Software Foundation, Inc.
147e83
+   This file is part of the GNU C Library.
147e83
+
147e83
+   The GNU C Library is free software; you can redistribute it and/or
147e83
+   modify it under the terms of the GNU Lesser General Public
147e83
+   License as published by the Free Software Foundation; either
147e83
+   version 2.1 of the License, or (at your option) any later version.
147e83
+
147e83
+   The GNU C Library is distributed in the hope that it will be useful,
147e83
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
+   Lesser General Public License for more details.
147e83
+
147e83
+   You should have received a copy of the GNU Lesser General Public
147e83
+   License along with the GNU C Library; if not, see
147e83
+   <http://www.gnu.org/licenses/>.  */
147e83
+
147e83
+#include <math.h>
147e83
+#include <math_ldbl_opt.h>
147e83
+#include <shlib-compat.h>
147e83
+#include "init-arch.h"
147e83
+
147e83
+extern __typeof (__isnan) __isnan_ppc64 attribute_hidden;
147e83
+extern __typeof (__isnan) __isnan_power5 attribute_hidden;
147e83
+extern __typeof (__isnan) __isnan_power6 attribute_hidden;
147e83
+extern __typeof (__isnan) __isnan_power6x attribute_hidden;
147e83
+extern __typeof (__isnan) __isnan_power7 attribute_hidden;
147e83
+
147e83
+libc_ifunc (__isnan,
147e83
+	    (hwcap & PPC_FEATURE_ARCH_2_06)
147e83
+	    ? __isnan_power7 :
147e83
+	      (hwcap & PPC_FEATURE_POWER6_EXT)
147e83
+		? __isnan_power6x :
147e83
+		(hwcap & PPC_FEATURE_ARCH_2_05)
147e83
+		  ? __isnan_power6 :
147e83
+		  (hwcap & PPC_FEATURE_POWER5)
147e83
+		    ? __isnan_power5
147e83
+            : __isnan_ppc64);
147e83
+
147e83
+weak_alias (__isnan, isnan)
147e83
+
147e83
+#ifdef NO_LONG_DOUBLE
147e83
+strong_alias (__isnan, __isnanl)
147e83
+weak_alias (__isnan, isnanl)
147e83
+#endif
147e83
+
147e83
+#ifndef IS_IN_libm
147e83
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
147e83
+compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
147e83
+compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
147e83
+# endif
147e83
+#endif
147e83
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c
147e83
new file mode 100644
147e83
index 0000000..b237455
147e83
--- /dev/null
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c
147e83
@@ -0,0 +1,40 @@
147e83
+/* Multiple versions of isnan.
147e83
+   Copyright (C) 2013-2014 Free Software Foundation, Inc.
147e83
+   This file is part of the GNU C Library.
147e83
+
147e83
+   The GNU C Library is free software; you can redistribute it and/or
147e83
+   modify it under the terms of the GNU Lesser General Public
147e83
+   License as published by the Free Software Foundation; either
147e83
+   version 2.1 of the License, or (at your option) any later version.
147e83
+
147e83
+   The GNU C Library is distributed in the hope that it will be useful,
147e83
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
+   Lesser General Public License for more details.
147e83
+
147e83
+   You should have received a copy of the GNU Lesser General Public
147e83
+   License along with the GNU C Library; if not, see
147e83
+   <http://www.gnu.org/licenses/>.  */
147e83
+
147e83
+#include <math.h>
147e83
+#include "init-arch.h"
147e83
+
147e83
+/* The double-precision implementation also works for the single one.  */
147e83
+extern __typeof (__isnanf) __isnan_ppc64 attribute_hidden;
147e83
+extern __typeof (__isnanf) __isnan_power5 attribute_hidden;
147e83
+extern __typeof (__isnanf) __isnan_power6 attribute_hidden;
147e83
+extern __typeof (__isnanf) __isnan_power6x attribute_hidden;
147e83
+extern __typeof (__isnanf) __isnan_power7 attribute_hidden;
147e83
+
147e83
+libc_ifunc (__isnanf,
147e83
+	    (hwcap & PPC_FEATURE_ARCH_2_06)
147e83
+	    ? __isnan_power7 :
147e83
+	      (hwcap & PPC_FEATURE_POWER6_EXT)
147e83
+		? __isnan_power6x :
147e83
+		(hwcap & PPC_FEATURE_ARCH_2_05)
147e83
+		  ? __isnan_power6 :
147e83
+		  (hwcap & PPC_FEATURE_POWER5)
147e83
+		    ? __isnan_power5
147e83
+            : __isnan_ppc64);
147e83
+
147e83
+weak_alias (__isnanf, isnanf)
147e83
-- 
147e83
1.8.3.1
147e83