diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes index c2059fe..8ce95dc 100644 --- a/glibc-testsuite.changes +++ b/glibc-testsuite.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de + +- powerpc-opt-power8.patch: readd POWER8 implementation of isnan, + isinf, finite with fix for little endian +- pthread-mutex-destroy.patch: Skip checks in pthread_mutex_destroy when + doing elision (bnc#865968) + ------------------------------------------------------------------- Sat Mar 29 16:41:25 UTC 2014 - schwab@suse.de diff --git a/glibc-testsuite.spec b/glibc-testsuite.spec index b2ffa52..e4bdad0 100644 --- a/glibc-testsuite.spec +++ b/glibc-testsuite.spec @@ -256,6 +256,8 @@ Patch2001: resolv-dont-ignore-second-answer.patch Patch2002: ldd-system-interp.patch # PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436) Patch2003: abort-no-flush.patch +# PATCH-FIX-UPSTREAM Skip checks in pthread_mutex_destroy when doing elision +Patch2004: pthread-mutex-destroy.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -468,6 +470,7 @@ rm nscd/s-stamp %patch2001 -p1 %patch2002 -p1 %patch2003 -p1 +%patch2004 -p1 %patch3000 diff --git a/glibc-utils.changes b/glibc-utils.changes index c2059fe..8ce95dc 100644 --- a/glibc-utils.changes +++ b/glibc-utils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de + +- powerpc-opt-power8.patch: readd POWER8 implementation of isnan, + isinf, finite with fix for little endian +- pthread-mutex-destroy.patch: Skip checks in pthread_mutex_destroy when + doing elision (bnc#865968) + ------------------------------------------------------------------- Sat Mar 29 16:41:25 UTC 2014 - schwab@suse.de diff --git a/glibc-utils.spec b/glibc-utils.spec index 9b364d1..ef4f6d7 100644 --- a/glibc-utils.spec +++ b/glibc-utils.spec @@ -255,6 +255,8 @@ Patch2001: resolv-dont-ignore-second-answer.patch Patch2002: ldd-system-interp.patch # PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436) Patch2003: abort-no-flush.patch +# PATCH-FIX-UPSTREAM Skip checks in pthread_mutex_destroy when doing elision +Patch2004: pthread-mutex-destroy.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -468,6 +470,7 @@ rm nscd/s-stamp %patch2001 -p1 %patch2002 -p1 %patch2003 -p1 +%patch2004 -p1 %patch3000 diff --git a/glibc.changes b/glibc.changes index c2059fe..8ce95dc 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de + +- powerpc-opt-power8.patch: readd POWER8 implementation of isnan, + isinf, finite with fix for little endian +- pthread-mutex-destroy.patch: Skip checks in pthread_mutex_destroy when + doing elision (bnc#865968) + ------------------------------------------------------------------- Sat Mar 29 16:41:25 UTC 2014 - schwab@suse.de diff --git a/glibc.spec b/glibc.spec index ae76ee6..2359870 100644 --- a/glibc.spec +++ b/glibc.spec @@ -256,6 +256,8 @@ Patch2001: resolv-dont-ignore-second-answer.patch Patch2002: ldd-system-interp.patch # PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436) Patch2003: abort-no-flush.patch +# PATCH-FIX-UPSTREAM Skip checks in pthread_mutex_destroy when doing elision +Patch2004: pthread-mutex-destroy.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -468,6 +470,7 @@ rm nscd/s-stamp %patch2001 -p1 %patch2002 -p1 %patch2003 -p1 +%patch2004 -p1 %patch3000 diff --git a/powerpc-opt-power8.patch b/powerpc-opt-power8.patch index 449f72f..e429a18 100644 --- a/powerpc-opt-power8.patch +++ b/powerpc-opt-power8.patch @@ -1,3 +1,16 @@ +2014-03-31 Adhemerval Zanella + + * sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S (MFVSRD_R3_V1): + Encode instruction correctly in little endian. + * sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S (MFVSRD_R3_V1): + Likewise. + * sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S (MFVSRD_R3_V1): + Likewise. + * sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S (MFVSRD_R3_V1): + Likewise. + * sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S (MFVSRD_R3_V1): + Likewise. + 2014-03-20 Adhemerval Zanella Vidya Ranganathan @@ -309,26 +322,80 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile -@@ -21,7 +21,8 @@ libm-sysdep_routines += s_isnan-power7 s +@@ -4,7 +4,8 @@ sysdep_routines += s_isnan-power7 s_isna + s_copysign-ppc64 s_finite-power7 s_finite-ppc64 \ + s_finitef-ppc64 s_isinff-ppc64 s_isinf-power7 \ + s_isinf-ppc64 s_modf-power5+ s_modf-ppc64 \ +- s_modff-power5+ s_modff-ppc64 ++ s_modff-power5+ s_modff-ppc64 s_isnan-power8 \ ++ s_isinf-power8 s_finite-power8 + + libm-sysdep_routines += s_isnan-power7 s_isnan-power6x s_isnan-power6 \ + s_isnan-power5 s_isnan-ppc64 s_llround-power6x \ +@@ -21,7 +22,9 @@ libm-sysdep_routines += s_isnan-power7 s s_logbl-power7 s_logb-ppc64 s_logbf-ppc64 \ s_logbl-ppc64 s_modf-power5+ s_modf-ppc64 \ s_modff-power5+ s_modff-ppc64 e_hypot-ppc64 \ - e_hypot-power7 e_hypotf-ppc64 e_hypotf-power7 + e_hypot-power7 e_hypotf-ppc64 e_hypotf-power7 \ ++ s_isnan-power8 s_isinf-power8 s_finite-power8 \ + s_llrint-power8 s_llround-power8 CFLAGS-s_logbf-power7.c = -mcpu=power7 CFLAGS-s_logbl-power7.c = -mcpu=power7 +Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power8.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power8.S +@@ -0,0 +1,33 @@ ++/* isnan(). PowerPC64/POWER7 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 ++ . */ ++ ++#include ++#include ++ ++#undef hidden_def ++#define hidden_def(name) ++#undef weak_alias ++#define weak_alias(name, alias) ++#undef strong_alias ++#define strong_alias(name, alias) ++#undef compat_symbol ++#define compat_symbol(lib, name, symbol, ver) ++ ++#define __finite __finite_power8 ++ ++#include Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c -@@ -25,8 +25,8 @@ extern __typeof (__finite) __finite_ppc6 +@@ -23,10 +23,13 @@ + + extern __typeof (__finite) __finite_ppc64 attribute_hidden; extern __typeof (__finite) __finite_power7 attribute_hidden; ++extern __typeof (__finite) __finite_power8 attribute_hidden; libc_ifunc (__finite, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __finite_power7 ++ (hwcap2 & PPC_FEATURE2_ARCH_2_07) ++ ? __finite_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __finite_power7 : __finite_ppc64); @@ -338,27 +405,75 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c -@@ -25,8 +25,8 @@ extern __typeof (__finitef) __finitef_pp +@@ -23,10 +23,13 @@ + extern __typeof (__finitef) __finitef_ppc64 attribute_hidden; + /* The double-precision version also works for single-precision. */ extern __typeof (__finitef) __finite_power7 attribute_hidden; ++extern __typeof (__finitef) __finite_power8 attribute_hidden; libc_ifunc (__finitef, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __finite_power7 ++ (hwcap2 & PPC_FEATURE2_ARCH_2_07) ++ ? __finite_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __finite_power7 : __finitef_ppc64); weak_alias (__finitef, finitef) +Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S +@@ -0,0 +1,33 @@ ++/* isinf(). PowerPC64/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 ++ . */ ++ ++#include ++#include ++ ++#undef hidden_def ++#define hidden_def(name) ++#undef weak_alias ++#define weak_alias(name, alias) ++#undef strong_alias ++#define strong_alias(name, alias) ++#undef compat_symbol ++#define compat_symbol(lib, name, alias, ver) ++ ++#define __isinf __isinf_power8 ++ ++#include Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c -@@ -25,8 +25,8 @@ extern __typeof (__isinf) __isinf_ppc64 +@@ -23,10 +23,13 @@ + + extern __typeof (__isinf) __isinf_ppc64 attribute_hidden; extern __typeof (__isinf) __isinf_power7 attribute_hidden; ++extern __typeof (__isinf) __isinf_power8 attribute_hidden; libc_ifunc (__isinf, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __isinf_power7 ++ (hwcap2 & PPC_FEATURE2_ARCH_2_07) ++ ? __isinf_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isinf_power7 : __isinf_ppc64); @@ -368,28 +483,76 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c -@@ -26,8 +26,8 @@ extern __typeof (__isinff) __isinff_ppc6 +@@ -24,10 +24,13 @@ + extern __typeof (__isinff) __isinff_ppc64 attribute_hidden; + /* The double-precision version also works for single-precision. */ extern __typeof (__isinff) __isinf_power7 attribute_hidden; ++extern __typeof (__isinff) __isinf_power8 attribute_hidden; libc_ifunc (__isinff, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __isinf_power7 ++ (hwcap2 & PPC_FEATURE2_ARCH_2_07) ++ ? __isinf_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isinf_power7 : __isinff_ppc64); weak_alias (__isinff, isinff) +Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power8.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power8.S +@@ -0,0 +1,33 @@ ++/* isnan(). PowerPC64/POWER7 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 ++ . */ ++ ++#include ++#include ++ ++#undef hidden_def ++#define hidden_def(name) ++#undef weak_alias ++#define weak_alias(name, alias) ++#undef strong_alias ++#define strong_alias(name, alias) ++#undef compat_symbol ++#define compat_symbol(lib, name, symbol, ver) ++ ++#define __isnan __isnan_power8 ++ ++#include Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c -@@ -28,14 +28,14 @@ extern __typeof (__isnan) __isnan_power6 +@@ -26,16 +26,19 @@ extern __typeof (__isnan) __isnan_power5 + extern __typeof (__isnan) __isnan_power6 attribute_hidden; + extern __typeof (__isnan) __isnan_power6x attribute_hidden; extern __typeof (__isnan) __isnan_power7 attribute_hidden; ++extern __typeof (__isnan) __isnan_power8 attribute_hidden; libc_ifunc (__isnan, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __isnan_power7 : - (hwcap & PPC_FEATURE_POWER6_EXT) ++ (hwcap2 & PPC_FEATURE2_ARCH_2_07) ++ ? __isnan_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isnan_power7 : + (hwcap & PPC_FEATURE_POWER6_EXT) @@ -409,8 +572,11 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c -@@ -27,14 +27,14 @@ extern __typeof (__isnanf) __isnan_power +@@ -25,16 +25,19 @@ extern __typeof (__isnanf) __isnan_power + extern __typeof (__isnanf) __isnan_power6 attribute_hidden; + extern __typeof (__isnanf) __isnan_power6x attribute_hidden; extern __typeof (__isnanf) __isnan_power7 attribute_hidden; ++extern __typeof (__isnanf) __isnan_power8 attribute_hidden; libc_ifunc (__isnanf, - (hwcap & PPC_FEATURE_ARCH_2_06) @@ -421,6 +587,8 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c - ? __isnan_power6 : - (hwcap & PPC_FEATURE_POWER5) - ? __isnan_power5 ++ (hwcap2 & PPC_FEATURE2_ARCH_2_07) ++ ? __isnan_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isnan_power7 : + (hwcap & PPC_FEATURE_POWER6_EXT) @@ -2196,11 +2364,229 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/power7/strspn.S + blr /* done */ +END(strspn) +libc_hidden_builtin_def (strspn) +Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S +@@ -0,0 +1,61 @@ ++/* isfinite(). PowerPC64/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 ++ . */ ++ ++#include ++#include ++#include ++ ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#define MFVSRD_R3_V1 .byte 0x66,0x00,0x23,0x7c /* mfvsrd r3,vs1 */ ++#else ++#define MFVSRD_R3_V1 .byte 0x7c,0x23,0x00,0x66 /* mfvsrd r3,vs1 */ ++#endif ++ ++/* int [r3] __finite ([fp1] x) */ ++ ++EALIGN (__finite, 4, 0) ++ CALL_MCOUNT 0 ++ MFVSRD_R3_V1 ++ lis r9,0x8010 ++ clrldi r3,r3,1 /* r3 = r3 & 0x8000000000000000 */ ++ rldicr r9,r9,32,31 /* r9 = (r9 << 32) & 0xffffffff */ ++ add r3,r3,r9 ++ rldicl r3,r3,1,63 ++ blr ++END (__finite) ++ ++hidden_def (__finite) ++weak_alias (__finite, finite) ++ ++/* It turns out that the 'double' version will also always work for ++ single-precision. */ ++strong_alias (__finite, __finitef) ++hidden_def (__finitef) ++weak_alias (__finitef, finitef) ++ ++#ifdef IS_IN_libm ++# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0) ++compat_symbol (libm, __finite, __finitel, GLIBC_2_0) ++compat_symbol (libm, finite, finitel, GLIBC_2_0) ++# endif ++#else ++# if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) ++compat_symbol (libc, __finite, __finitel, GLIBC_2_0); ++compat_symbol (libc, finite, finitel, GLIBC_2_0); ++# endif ++#endif +Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_finitef.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_finitef.S +@@ -0,0 +1 @@ ++/* This function uses the same code as s_finite.S. */ +Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S +@@ -0,0 +1,66 @@ ++/* isinf(). PowerPC64/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 ++ . */ ++ ++#include ++#include ++#include ++ ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#define MFVSRD_R3_V1 .byte 0x66,0x00,0x23,0x7c /* mfvsrd r3,vs1 */ ++#else ++#define MFVSRD_R3_V1 .byte 0x7c,0x23,0x00,0x66 /* mfvsrd r3,vs1 */ ++#endif ++ ++/* int [r3] __isinf([fp1] x) */ ++ ++EALIGN (__isinf, 4, 0) ++ CALL_MCOUNT 0 ++ MFVSRD_R3_V1 ++ lis r9,0x7ff0 /* r9 = 0x7ff0 */ ++ rldicl r10,r3,0,1 /* r10 = r3 & (0x8000000000000000) */ ++ sldi r9,r9,32 /* r9 = r9 << 52 */ ++ cmpd cr7,r10,r9 /* fp1 & 0x7ff0000000000000 ? */ ++ beq cr7,L(inf) ++ li r3,0 /* Not inf */ ++ blr ++L(inf): ++ sradi r3,r3,63 /* r3 = r3 >> 63 */ ++ ori r3,r3,1 /* r3 = r3 | 0x1 */ ++ blr ++END (__isinf) ++ ++hidden_def (__isinf) ++weak_alias (__isinf, isinf) ++ ++/* It turns out that the 'double' version will also always work for ++ single-precision. */ ++strong_alias (__isinf, __isinff) ++hidden_def (__isinff) ++weak_alias (__isinff, isinff) ++ ++#ifdef NO_LONG_DOUBLE ++strong_alias (__isinf, __isinfl) ++weak_alias (__isinf, isinfl) ++#endif ++ ++#ifndef IS_IN_libm ++# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) ++compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0); ++compat_symbol (libc, isinf, isinfl, GLIBC_2_0); ++# endif ++#endif +Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isinff.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isinff.S +@@ -0,0 +1 @@ ++/* This function uses the same code as s_isinf.S. */ +Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S +@@ -0,0 +1,58 @@ ++/* isnan(). PowerPC64/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 ++ . */ ++ ++#include ++#include ++#include ++ ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#define MFVSRD_R3_V1 .byte 0x66,0x00,0x23,0x7c /* mfvsrd r3,vs1 */ ++#else ++#define MFVSRD_R3_V1 .byte 0x7c,0x23,0x00,0x66 /* mfvsrd r3,vs1 */ ++#endif ++ ++/* int [r3] __isnan([f1] x) */ ++ ++EALIGN (__isnan, 4, 0) ++ CALL_MCOUNT 0 ++ MFVSRD_R3_V1 ++ lis r9,0x7ff0 ++ clrldi r3,r3,1 /* r3 = r3 & 0x8000000000000000 */ ++ rldicr r9,r9,32,31 /* r9 = (r9 << 32) & 0xffffffff */ ++ subf r3,r3,r9 ++ rldicl r3,r3,1,63 ++ blr ++END (__isnan) ++ ++/* It turns out that the 'double' version will also always work for ++ single-precision. */ ++strong_alias (__isnan, __isnanf) ++hidden_def (__isnanf) ++weak_alias (__isnanf, isnanf) ++ ++#ifdef NO_LONG_DOUBLE ++strong_alias (__isnan, __isnanl) ++weak_alias (__isnan, isnanl) ++#endif ++ ++#ifndef IS_IN_libm ++# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) ++compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0); ++compat_symbol (libc, isnan, isnanl, GLIBC_2_0); ++# endif ++#endif +Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isnanf.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isnanf.S +@@ -0,0 +1 @@ ++/* This function uses the same code as s_isnan.S. */ Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S =================================================================== --- /dev/null +++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S -@@ -0,0 +1,45 @@ +@@ -0,0 +1,50 @@ +/* Round double to long int. POWER8 PowerPC64 version. + Copyright (C) 2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -2220,9 +2606,14 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S + . */ + +#include ++#include +#include + ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#define MFVSRD_R3_V1 .byte 0x66,0x00,0x23,0x7c /* mfvsrd r3,vs1 */ ++#else +#define MFVSRD_R3_V1 .byte 0x7c,0x23,0x00,0x66 /* mfvsrd r3,vs1 */ ++#endif + +/* long long int[r3] __llrint (double x[fp1]) */ +ENTRY (__llrint) @@ -2250,7 +2641,7 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S =================================================================== --- /dev/null +++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S -@@ -0,0 +1,47 @@ +@@ -0,0 +1,52 @@ +/* llround function. POWER8 PowerPC64 version. + Copyright (C) 2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -2270,9 +2661,14 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S + . */ + +#include ++#include +#include + ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#define MFVSRD_R3_V1 .byte 0x66,0x00,0x23,0x7c /* mfvsrd r3,vs1 */ ++#else +#define MFVSRD_R3_V1 .byte 0x7c,0x23,0x00,0x66 /* mfvsrd r3,vs1 */ ++#endif + +/* long long [r3] llround (float x [fp1]) */ + diff --git a/pthread-mutex-destroy.patch b/pthread-mutex-destroy.patch new file mode 100644 index 0000000..4ecd866 --- /dev/null +++ b/pthread-mutex-destroy.patch @@ -0,0 +1,61 @@ +[PATCH] Skip checks in pthread_mutex_destroy when doing elision + +When doing elisison the __nusers field is not updated, thus can have an +arbitrary value. + + [BZ #16657] + * nptl/pthread_mutex_destroy.c (__pthread_mutex_destroy): Skip + checks when doing elision. + * nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_destroy.c: New file. + +Index: glibc-2.18/nptl/pthread_mutex_destroy.c +=================================================================== +--- glibc-2.18.orig/nptl/pthread_mutex_destroy.c ++++ glibc-2.18/nptl/pthread_mutex_destroy.c +@@ -21,6 +21,9 @@ + + #include + ++#ifndef DO_ELISION ++# define DO_ELISION(m) 0 ++#endif + + int + __pthread_mutex_destroy (mutex) +@@ -28,7 +31,8 @@ __pthread_mutex_destroy (mutex) + { + LIBC_PROBE (mutex_destroy, 1, mutex); + +- if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0 ++ if (!DO_ELISION (mutex) ++ && (mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0 + && mutex->__data.__nusers != 0) + return EBUSY; + +Index: glibc-2.18/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_destroy.c +=================================================================== +--- /dev/null ++++ glibc-2.18/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_destroy.c +@@ -0,0 +1,22 @@ ++/* Elided version of pthread_mutex_destroy. ++ 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 ++ . */ ++ ++#include ++#include "force-elision.h" ++ ++#include "nptl/pthread_mutex_destroy.c"