This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch tuliom/multilib updated. glibc-2.17-412-g17ce991
- From: azanella at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 16 Apr 2013 13:54:12 -0000
- Subject: GNU C Library master sources branch tuliom/multilib updated. glibc-2.17-412-g17ce991
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, tuliom/multilib has been updated
via 17ce9917aef371cc762884c671dee39f7c13968a (commit)
via 3a0fcf7173fb4985e9d9d696ed074079f938d70c (commit)
via 8117c9baecf35c4bc44f56638c9e9e94c20f169c (commit)
via 462bf827feb84f9d66651aa2e976a5bfb2e00e1a (commit)
via f0e2c9eae9ccf2867d4c25d40428ecb4aa98d7d7 (commit)
via 1e368841229b7c49df432d11502edc095a7120ae (commit)
via 6ff559172d033b0b72b10afe51aeb96aca18427c (commit)
via a32627fd54d1fdcbf61423bd2e457ae93ccc2d4e (commit)
via a5022c81c6a1c09a756ca91d019fbc07c91e7dc1 (commit)
from aa5bd1097bbffa3414dc78c4a9e193389ef29e2c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=17ce9917aef371cc762884c671dee39f7c13968a
commit 17ce9917aef371cc762884c671dee39f7c13968a
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date: Mon Apr 15 21:54:06 2013 -0500
PowerPC: logb/logbf/logbl multilib for PowerPC32
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_logbl.c b/sysdeps/ieee754/ldbl-128ibm/s_logbl.c
index 6cbfcfa..28a50de 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_logbl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_logbl.c
@@ -44,4 +44,6 @@ __logbl (long double x)
return (long double) (rhx - 1023);
}
+#ifndef __logbl
long_double_symbol (libm, __logbl, logbl);
+#endif
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
index 372af26..10d12c1 100644
--- a/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
@@ -33,7 +33,10 @@ libm-sysdep_routines += s_llrintf-power6 s_llrintf-power4 s_llrintf-c \
s_finite-power7 s_finite-c \
s_finitef-c \
s_isinf-power7 s_isinf-c \
- s_isinff-c
+ s_isinff-c \
+ s_logbl-power7 s_logbl-c \
+ s_logb-power7 s_logb-c \
+ s_logbf-power7 s_logbf-c
CFLAGS-s_llround.c = -fno-builtin-llroundf
CFLAGS-s_lround.c = -fno-builtin-lroundf
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb-c.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb-c.c
new file mode 100644
index 0000000..eb98d74
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb-c.c
@@ -0,0 +1,10 @@
+#include <math.h>
+
+#undef weak_alias
+#define weak_alias(a, b)
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __logb __logb_ppc32
+
+#include <sysdeps/ieee754/dbl-64/s_logb.c>
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_logb.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb-power7.c
similarity index 89%
rename from sysdeps/powerpc/powerpc32/power7/fpu/s_logb.c
rename to sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb-power7.c
index da2e6b9..d54525b 100644
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_logb.c
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb-power7.c
@@ -16,7 +16,10 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <math_ldbl_opt.h>
+#include <math.h>
+#include <math_private.h>
+
+__typeof (__logb) __logb_power7 __attribute__ ((__target__ ("cpu=power7")));
/* This implementation avoids FP to INT conversions by using VSX
bitwise instructions over FP values. */
@@ -31,7 +34,7 @@ static const union {
} mask = { 0x7ff0000000000000ULL };
double
-__logb (double x)
+__logb_power7 (double x)
{
double ret;
@@ -67,12 +70,3 @@ __logb (double x)
/* Test to avoid logb_downward (0.0) == -0.0. */
return ret == -0.0 ? 0.0 : ret;
}
-weak_alias (__logb, logb)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__logb, __logbl)
-weak_alias (__logb, logbl)
-#endif
-
-#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
-compat_symbol (libm, logb, logbl, GLIBC_2_0);
-#endif
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb.c
new file mode 100644
index 0000000..f55cf51
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb.c
@@ -0,0 +1,41 @@
+/* Multiple versions of s_logb.
+ Copyright (C) 2013 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 <shlib-compat.h>
+#include "init-arch.h"
+
+extern __typeof (__logb) __logb_ppc32 attribute_hidden;
+extern __typeof (__logb) __logb_power7 attribute_hidden;
+
+libc_ifunc (__logb,
+ (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __logb_power7
+ : __logb_ppc32);
+
+weak_alias (__logb, logb)
+
+#ifdef NO_LONG_DOUBLE
+strong_alias (__logb, __logbl)
+weak_alias (__logb, logbl)
+#endif
+
+#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
+compat_symbol (libm, logb, logbl, GLIBC_2_0);
+#endif
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbf-c.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbf-c.c
new file mode 100644
index 0000000..b569a1c
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbf-c.c
@@ -0,0 +1,8 @@
+#include <math.h>
+
+#undef weak_alias
+#define weak_alias(a, b)
+
+#define __logbf __logbf_ppc32
+
+#include <sysdeps/ieee754/flt-32/s_logbf.c>
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_logbf.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbf-power7.c
similarity index 94%
rename from sysdeps/powerpc/powerpc32/power7/fpu/s_logbf.c
rename to sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbf-power7.c
index 05726f2..5d87c6f 100644
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_logbf.c
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbf-power7.c
@@ -16,7 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include "math_private.h"
+#include <math.h>
+
+__typeof (__logbf) __logbf_power7 __attribute__ ((__target__ ("cpu=power7")));
/* This implementation avoids FP to INT conversions by using VSX
bitwise instructions over FP values. */
@@ -32,7 +34,7 @@ static const union {
} mask = { 0x7ff0000000000000ULL };
float
-__logbf (float x)
+__logbf_power7 (float x)
{
/* VSX operation are all done internally as double. */
double ret;
@@ -57,4 +59,3 @@ __logbf (float x)
The test is to avoid logb_downward (0.0) == -0.0. */
return ret == -0.0 ? 0.0 : ret;
}
-weak_alias (__logbf, logbf)
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbf.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbf.c
new file mode 100644
index 0000000..d0b50b0
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbf.c
@@ -0,0 +1,32 @@
+/* Multiple versions of s_logb.
+ Copyright (C) 2013 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 <shlib-compat.h>
+#include "init-arch.h"
+
+extern __typeof (__logbf) __logbf_ppc32 attribute_hidden;
+extern __typeof (__logbf) __logbf_power7 attribute_hidden;
+
+libc_ifunc (__logbf,
+ (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __logbf_power7
+ : __logbf_ppc32);
+
+weak_alias (__logbf, logbf)
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbl-c.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbl-c.c
new file mode 100644
index 0000000..1fc965b
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbl-c.c
@@ -0,0 +1,7 @@
+#include <math.h>
+#include <math_private.h>
+#include <math_ldbl_opt.h>
+
+#define __logbl __logbl_ppc32
+
+#include <sysdeps/ieee754/ldbl-128ibm/s_logbl.c>
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_logbl.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbl-power7.c
similarity index 95%
rename from sysdeps/powerpc/powerpc32/power7/fpu/s_logbl.c
rename to sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbl-power7.c
index e008ed0..e783b46 100644
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_logbl.c
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbl-power7.c
@@ -20,6 +20,8 @@
#include <math_private.h>
#include <math_ldbl_opt.h>
+__typeof (__logbl) __logbl_power7 __attribute__ ((__target__ ("cpu=power7")));
+
/* This implementation avoids FP to INT conversions by using VSX
bitwise instructions over FP values. */
@@ -33,7 +35,7 @@ static const union {
} mask = { 0x7ff0000000000000ULL };
long double
-__logbl (long double x)
+__logbl_power7 (long double x)
{
double xh, xl;
double ret;
@@ -66,5 +68,3 @@ __logbl (long double x)
/* Test to avoid logb_downward (0.0) == -0.0. */
return ret == -0.0 ? 0.0 : ret;
}
-
-long_double_symbol (libm, __logbl, logbl);
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbl.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbl.c
new file mode 100644
index 0000000..8703da5
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbl.c
@@ -0,0 +1,32 @@
+/* Multiple versions of s_finite.
+ Copyright (C) 2013 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 <shlib-compat.h>
+#include "init-arch.h"
+
+extern __typeof (__logbl) __logbl_ppc32 attribute_hidden;
+extern __typeof (__logbl) __logbl_power7 attribute_hidden;
+
+libc_ifunc (__logbl,
+ (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __logbl_power7
+ : __logbl_ppc32);
+
+long_double_symbol (libm, __logbl, logbl);
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3a0fcf7173fb4985e9d9d696ed074079f938d70c
commit 3a0fcf7173fb4985e9d9d696ed074079f938d70c
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date: Mon Apr 15 15:03:11 2013 -0500
PowerPC: isinf/isinff multilib for PowerPC32
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
index 5ac842f..372af26 100644
--- a/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
@@ -5,7 +5,9 @@ sysdep_routines += s_isnan-power7 s_isnan-power6 s_isnan-power5 \
s_isnanf-ppc32 \
s_copysign-power6 s_copysign-ppc32 \
s_finite-power7 s_finite-c \
- s_finitef-c
+ s_finitef-c \
+ s_isinf-power7 s_isinf-c \
+ s_isinff-c
libm-sysdep_routines += s_llrintf-power6 s_llrintf-power4 s_llrintf-c \
s_llrint-power6 s_llrint-power4 s_llrint-c \
@@ -29,7 +31,9 @@ libm-sysdep_routines += s_llrintf-power6 s_llrintf-power4 s_llrintf-c \
s_lround-power6x s_lround-power5+ s_lround-ppc32 \
s_lrint-power6x s_lrint-ppc32 \
s_finite-power7 s_finite-c \
- s_finitef-c
+ s_finitef-c \
+ s_isinf-power7 s_isinf-c \
+ s_isinff-c
CFLAGS-s_llround.c = -fno-builtin-llroundf
CFLAGS-s_lround.c = -fno-builtin-lroundf
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinf-c.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinf-c.c
new file mode 100644
index 0000000..794b0e1
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinf-c.c
@@ -0,0 +1,13 @@
+#include <math.h>
+
+#undef weak_alias
+#define weak_alias(a, b)
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __isinf __isinf_ppc32
+#undef hidden_def
+#define hidden_def(a) \
+ __hidden_ver1 (__isinf_ppc32, __GI___isinf, __isinf_ppc32);
+
+#include <sysdeps/ieee754/dbl-64/s_isinf.c>
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinf-power7.S
similarity index 78%
rename from sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S
rename to sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinf-power7.S
index 3f8af60..0771ce2 100644
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinf-power7.S
@@ -29,7 +29,7 @@
.section ".text"
.type __isinf, @function
.machine power7
-ENTRY (__isinf)
+ENTRY (__isinf_power7)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
@@ -62,25 +62,5 @@ ENTRY (__isinf)
beqlr cr7 /* EQ means INF, otherwise -INF. */
li r3,-1
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
+END (__isinf_power7)
+weak_alias (__isinf_power7, __isinff_power7)
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinf.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinf.c
new file mode 100644
index 0000000..94a1642
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinf.c
@@ -0,0 +1,44 @@
+/* Multiple versions of s_isinf.
+ Copyright (C) 2013 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 <shlib-compat.h>
+#include "init-arch.h"
+
+extern __typeof (__isinf) __isinf_ppc32 attribute_hidden;
+extern __typeof (__isinf) __isinf_power7 attribute_hidden;
+
+libc_ifunc (__isinf,
+ (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __isinf_power7
+ : __isinf_ppc32);
+
+weak_alias (__isinf, isinf)
+
+#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
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinff-c.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinff-c.c
new file mode 100644
index 0000000..9efb44f
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinff-c.c
@@ -0,0 +1,11 @@
+#include <math.h>
+
+#undef weak_alias
+#define weak_alias(a, b)
+
+#define __isinff __isinff_ppc32
+#undef hidden_def
+#define hidden_def(a) \
+ __hidden_ver1 (__isinff_ppc32, __GI___isinff, __isinff_ppc32);
+
+#include <sysdeps/ieee754/flt-32/s_isinff.c>
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinff.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinff.c
new file mode 100644
index 0000000..6705391
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinff.c
@@ -0,0 +1,32 @@
+/* Multiple versions of s_isinf.
+ Copyright (C) 2013 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 <shlib-compat.h>
+#include "init-arch.h"
+
+extern __typeof (__isinff) __isinff_ppc32 attribute_hidden;
+extern __typeof (__isinff) __isinff_power7 attribute_hidden;
+
+libc_ifunc (__isinff,
+ (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __isinff_power7
+ : __isinff_ppc32);
+
+weak_alias (__isinff, isinff)
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S b/sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S
deleted file mode 100644
index be759e0..0000000
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S
+++ /dev/null
@@ -1 +0,0 @@
-/* This function uses the same code as s_isinf.S. */
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8117c9baecf35c4bc44f56638c9e9e94c20f169c
commit 8117c9baecf35c4bc44f56638c9e9e94c20f169c
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date: Mon Apr 15 14:42:34 2013 -0500
PowerPC: finite/finitef multilib for PowerPC32
diff --git a/sysdeps/ieee754/dbl-64/s_finite.c b/sysdeps/ieee754/dbl-64/s_finite.c
index 47dad5d..b7fe951 100644
--- a/sysdeps/ieee754/dbl-64/s_finite.c
+++ b/sysdeps/ieee754/dbl-64/s_finite.c
@@ -22,7 +22,6 @@ static char rcsid[] = "$NetBSD: s_finite.c,v 1.8 1995/05/10 20:47:17 jtc Exp $";
#include <math.h>
#include <math_private.h>
-#undef __finite
int __finite(double x)
{
int32_t hx;
diff --git a/sysdeps/ieee754/flt-32/s_finitef.c b/sysdeps/ieee754/flt-32/s_finitef.c
index dfdf4ad..b7c7638 100644
--- a/sysdeps/ieee754/flt-32/s_finitef.c
+++ b/sysdeps/ieee754/flt-32/s_finitef.c
@@ -25,7 +25,6 @@ static char rcsid[] = "$NetBSD: s_finitef.c,v 1.4 1995/05/10 20:47:18 jtc Exp $"
#include <math.h>
#include <math_private.h>
-#undef __finitef
int __finitef(float x)
{
int32_t ix;
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
index 59ccf4f..5ac842f 100644
--- a/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
@@ -3,7 +3,9 @@ sysdep_routines += s_isnan-power7 s_isnan-power6 s_isnan-power5 \
s_isnan-ppc32 \
s_isnanf-power7 s_isnanf-power6 s_isnanf-power5 \
s_isnanf-ppc32 \
- s_copysign-power6 s_copysign-ppc32
+ s_copysign-power6 s_copysign-ppc32 \
+ s_finite-power7 s_finite-c \
+ s_finitef-c
libm-sysdep_routines += s_llrintf-power6 s_llrintf-power4 s_llrintf-c \
s_llrint-power6 s_llrint-power4 s_llrint-c \
@@ -25,7 +27,10 @@ libm-sysdep_routines += s_llrintf-power6 s_llrintf-power4 s_llrintf-c \
s_trunc-power5+ s_trunc-ppc32 \
s_truncf-power5+ s_truncf-ppc32 \
s_lround-power6x s_lround-power5+ s_lround-ppc32 \
- s_lrint-power6x s_lrint-ppc32
+ s_lrint-power6x s_lrint-ppc32 \
+ s_finite-power7 s_finite-c \
+ s_finitef-c
CFLAGS-s_llround.c = -fno-builtin-llroundf
+CFLAGS-s_lround.c = -fno-builtin-lroundf
endif
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finite-c.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finite-c.c
new file mode 100644
index 0000000..a4f4cba
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finite-c.c
@@ -0,0 +1,13 @@
+#include <math.h>
+
+#undef weak_alias
+#define weak_alias(a, b)
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __finite __finite_ppc32
+#undef hidden_def
+#define hidden_def(a) \
+ __hidden_ver1 (__finite_ppc32, __GI___finite, __finite_ppc32);
+
+#include <sysdeps/ieee754/dbl-64/s_finite.c>
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finite-power7.S
similarity index 71%
rename from sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
rename to sysdeps/powerpc/powerpc32/fpu/multiarch/s_finite-power7.S
index b2ab5bf..c9bebd6 100644
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finite-power7.S
@@ -29,7 +29,7 @@
.section ".text"
.type __finite, @function
.machine power7
-ENTRY (__finite)
+ENTRY (__finite_power7)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
@@ -63,32 +63,5 @@ ENTRY (__finite)
bltlr cr7 /* LT means we have a denormal. */
li r3,0
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 NO_LONG_DOUBLE
-strong_alias (__finite, __finitel)
-weak_alias (__finite, finitel)
-#endif
-
-#ifdef IS_IN_libm
-# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
-compat_symbol (libm, finite, finitel, GLIBC_2_0)
-# endif
-# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)
-compat_symbol (libm, __finite, __finitel, GLIBC_2_1)
-# 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
+END (__finite_power7)
+weak_alias (__finite_power7, __finitef_power7)
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finite.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finite.c
new file mode 100644
index 0000000..3a4795f
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finite.c
@@ -0,0 +1,51 @@
+/* Multiple versions of s_finite.
+ Copyright (C) 2013 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 <shlib-compat.h>
+#include "init-arch.h"
+
+extern __typeof (__finite) __finite_ppc32 attribute_hidden;
+extern __typeof (__finite) __finite_power7 attribute_hidden;
+
+libc_ifunc (__finite,
+ (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __finite_power7
+ : __finite_ppc32);
+
+weak_alias (__finite, finite)
+
+#ifdef NO_LONG_DOUBLE
+strong_alias (__finite, __finitel)
+weak_alias (__finite, finitel)
+#endif
+
+#ifdef IS_IN_libm
+# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
+compat_symbol (libm, finite, finitel, GLIBC_2_0);
+# endif
+# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)
+compat_symbol (libm, __finite, __finitel, GLIBC_2_1);
+# 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
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finitef-c.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finitef-c.c
new file mode 100644
index 0000000..5d05d14
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finitef-c.c
@@ -0,0 +1,11 @@
+#include <math.h>
+
+#undef weak_alias
+#define weak_alias(a, b)
+
+#define __finitef __finitef_ppc32
+#undef hidden_def
+#define hidden_def(a) \
+ __hidden_ver1 (__finitef_ppc32, __GI___finitef, __finitef_ppc32);
+
+#include <sysdeps/ieee754/flt-32/s_finitef.c>
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finitef.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finitef.c
new file mode 100644
index 0000000..39397c4
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_finitef.c
@@ -0,0 +1,32 @@
+/* Multiple versions of s_finite.
+ Copyright (C) 2013 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 <shlib-compat.h>
+#include "init-arch.h"
+
+extern __typeof (__finitef) __finitef_ppc32 attribute_hidden;
+extern __typeof (__finitef) __finitef_power7 attribute_hidden;
+
+libc_ifunc (__finitef,
+ (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __finitef_power7
+ : __finitef_ppc32);
+
+weak_alias (__finitef, finitef)
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_finitef.S b/sysdeps/powerpc/powerpc32/power7/fpu/s_finitef.S
deleted file mode 100644
index 54bd941..0000000
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_finitef.S
+++ /dev/null
@@ -1 +0,0 @@
-/* This function uses the same code as s_finite.S. */
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=462bf827feb84f9d66651aa2e976a5bfb2e00e1a
commit 462bf827feb84f9d66651aa2e976a5bfb2e00e1a
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date: Mon Apr 15 08:11:05 2013 -0500
PowerPC: lrint/lrintf multilib for PowerPC32
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
index 0ee4c9f..59ccf4f 100644
--- a/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
@@ -24,7 +24,8 @@ libm-sysdep_routines += s_llrintf-power6 s_llrintf-power4 s_llrintf-c \
s_roundf-power5+ s_roundf-ppc32 \
s_trunc-power5+ s_trunc-ppc32 \
s_truncf-power5+ s_truncf-ppc32 \
- s_lround-power6x s_lround-power5+ s_lround-ppc32
+ s_lround-power6x s_lround-power5+ s_lround-ppc32 \
+ s_lrint-power6x s_lrint-ppc32
CFLAGS-s_llround.c = -fno-builtin-llroundf
endif
diff --git a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrint-power6x.S
similarity index 76%
copy from sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S
copy to sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrint-power6x.S
index d0cc159..f752895 100644
--- a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrint-power6x.S
@@ -21,21 +21,8 @@
.machine "power6"
/* long int[r3] __lrint (double x[fp1]) */
-ENTRY (__lrint)
+ENTRY (__lrint_power6x)
fctiw fp13,fp1
mftgpr r3,fp13
blr
- END (__lrint)
-
-weak_alias (__lrint, lrint)
-
-strong_alias (__lrint, __lrintf)
-weak_alias (__lrint, lrintf)
-
-#ifdef NO_LONG_DOUBLE
-strong_alias (__lrint, __lrintl)
-weak_alias (__lrint, lrintl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __lrint, lrintl, GLIBC_2_1)
-#endif
+END (__lrint_power6x)
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrint-ppc32.S b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrint-ppc32.S
new file mode 100644
index 0000000..145877d
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrint-ppc32.S
@@ -0,0 +1,13 @@
+#include <sysdep.h>
+#include <math_ldbl_opt.h>
+
+#undef weak_alias
+#define weak_alias(a,b)
+#undef strong_alias
+#define strong_alias(a,b)
+#undef compat_symbol
+#define compat_symbol(a,b,c,d)
+
+#define __lrint __lrint_ppc32
+
+#include <sysdeps/powerpc/powerpc32/fpu/s_lrint.S>
diff --git a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrint.c
similarity index 56%
rename from sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S
rename to sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrint.c
index d0cc159..99631c5 100644
--- a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrint.c
@@ -1,5 +1,5 @@
-/* Round double to long int. POWER6x PowerPC32 version.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+/* Multiple versions of s_lrint.
+ Copyright (C) 2013 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
@@ -16,26 +16,37 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
+/* Redefine lrintf/__lrintf so that compiler won't complain abouti
+ the type mismatch with the IFUNC selector in strong_alias/weak_alias
+ below. */
+#undef lrintf
+#define lrintf __redirect_lrintf
+#undef __lrintf
+#define __lrintf __redirect___lrintf
+#include <math.h>
+#undef lrintf
+#undef __lrintf
#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
+#include "init-arch.h"
- .machine "power6"
-/* long int[r3] __lrint (double x[fp1]) */
-ENTRY (__lrint)
- fctiw fp13,fp1
- mftgpr r3,fp13
- blr
- END (__lrint)
+extern __typeof (__lrint) __lrint_ppc32 attribute_hidden;
+extern __typeof (__lrint) __lrint_power6x attribute_hidden;
+
+libc_ifunc (__lrint,
+ (hwcap & PPC_FEATURE_POWER6_EXT) ?
+ __lrint_power6x
+ : __lrint_ppc32);
weak_alias (__lrint, lrint)
-strong_alias (__lrint, __lrintf)
weak_alias (__lrint, lrintf)
+strong_alias(__lrint, __lrintf)
#ifdef NO_LONG_DOUBLE
-strong_alias (__lrint, __lrintl)
weak_alias (__lrint, lrintl)
+strong_alias (__lrint, __lrintl)
#endif
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __lrint, lrintl, GLIBC_2_1)
+compat_symbol (libm, __lrint, lrintl, GLIBC_2_1);
#endif
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrintf.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrintf.c
new file mode 100644
index 0000000..659084e
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrintf.c
@@ -0,0 +1 @@
+/* s_lrintf.c is in s_lrint.c */
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f0e2c9eae9ccf2867d4c25d40428ecb4aa98d7d7
commit f0e2c9eae9ccf2867d4c25d40428ecb4aa98d7d7
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date: Mon Apr 15 07:48:56 2013 -0500
PowerPC: lround/lroundf multilib for PowerPC32
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
index 14d3321..0ee4c9f 100644
--- a/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
@@ -23,7 +23,8 @@ libm-sysdep_routines += s_llrintf-power6 s_llrintf-power4 s_llrintf-c \
s_round-power5+ s_round-ppc32 \
s_roundf-power5+ s_roundf-ppc32 \
s_trunc-power5+ s_trunc-ppc32 \
- s_truncf-power5+ s_truncf-ppc32
+ s_truncf-power5+ s_truncf-ppc32 \
+ s_lround-power6x s_lround-power5+ s_lround-ppc32
CFLAGS-s_llround.c = -fno-builtin-llroundf
endif
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround-power5+.S
similarity index 83%
rename from sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S
rename to sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround-power5+.S
index 0fa359d..bb3ea76 100644
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround-power5+.S
@@ -17,19 +17,19 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
#include <math_ldbl_opt.h>
-
+
/* long [r3] lround (float x [fp1])
- IEEE 1003.1 lround function. IEEE specifies "round to the nearest
+ IEEE 1003.1 lround function. IEEE specifies "round to the nearest
integer value, rounding halfway cases away from zero, regardless of
the current rounding mode." However PowerPC Architecture defines
- "round to Nearest" as "Choose the best approximation. In case of a
- tie, choose the one that is even (least significant bit o).".
+ "round to Nearest" as "Choose the best approximation. In case of a
+ tie, choose the one that is even (least significant bit o).".
So we pre-round using the V2.02 Floating Round to Integer Nearest
instruction before we use the Floating Convert to Integer Word with
round to zero instruction. */
.machine "power5"
-ENTRY (__lround)
+ENTRY (__lround_power5plus)
stwu r1,-16(r1)
cfi_adjust_cfa_offset (16)
frin fp2,fp1
@@ -41,17 +41,4 @@ ENTRY (__lround)
lwz r3,12(r1)
addi r1,r1,16
blr
- END (__lround)
-
-weak_alias (__lround, lround)
-
-strong_alias (__lround, __lroundf)
-weak_alias (__lround, lroundf)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__lround, lroundl)
-strong_alias (__lround, __lroundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __lround, lroundl, GLIBC_2_1)
-#endif
+END (__lround_power5plus)
diff --git a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround-power6x.S
similarity index 82%
rename from sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S
rename to sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround-power6x.S
index 950b695..49c5a71 100644
--- a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround-power6x.S
@@ -18,34 +18,21 @@
#include <sysdep.h>
#include <math_ldbl_opt.h>
-
+
/* long [r3] lround (float x [fp1])
- IEEE 1003.1 lround function. IEEE specifies "round to the nearest
+ IEEE 1003.1 lround function. IEEE specifies "round to the nearest
integer value, rounding halfway cases away from zero, regardless of
the current rounding mode." However PowerPC Architecture defines
- "round to Nearest" as "Choose the best approximation. In case of a
- tie, choose the one that is even (least significant bit o).".
+ "round to Nearest" as "Choose the best approximation. In case of a
+ tie, choose the one that is even (least significant bit o).".
So we pre-round using the V2.02 Floating Round to Integer Nearest
instruction before we use the Floating Convert to Integer Word with
round to zero instruction. */
.machine "power6"
-ENTRY (__lround)
+ENTRY (__lround_power6x)
frin fp2,fp1 /* Pre-round +-0.5. */
fctiwz fp3,fp2 /* Convert To Integer Word lround toward 0. */
mftgpr r3,fp3 /* Transfer fpr3 to r3. */
blr
- END (__lround)
-
-weak_alias (__lround, lround)
-
-strong_alias (__lround, __lroundf)
-weak_alias (__lround, lroundf)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__lround, lroundl)
-strong_alias (__lround, __lroundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __lround, lroundl, GLIBC_2_1)
-#endif
+END (__lround_power6x)
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround-ppc32.S b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround-ppc32.S
new file mode 100644
index 0000000..de6b919
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround-ppc32.S
@@ -0,0 +1,13 @@
+#include <sysdep.h>
+#include <math_ldbl_opt.h>
+
+#undef weak_alias
+#define weak_alias(a,b)
+#undef strong_alias
+#define strong_alias(a,b)
+#undef compat_symbol
+#define compat_symbol(a,b,c,d)
+
+#define __lround __lround_ppc32
+
+#include <sysdeps/powerpc/powerpc32/fpu/s_lround.S>
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround.c
new file mode 100644
index 0000000..f133120
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround.c
@@ -0,0 +1,55 @@
+/* Multiple versions of s_lround.
+ Copyright (C) 2013 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/>. */
+
+/* Redefine lroundf/__lroundf so that compiler won't complain abouti
+ the type mismatch with the IFUNC selector in strong_alias/weak_alias
+ below. */
+#undef lroundf
+#define lroundf __redirect_lroundf
+#undef __lroundf
+#define __lroundf __redirect___lroundf
+#include <math.h>
+#undef lroundf
+#undef __lroundf
+#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
+#include "init-arch.h"
+
+extern __typeof (__lround) __lround_ppc32 attribute_hidden;
+extern __typeof (__lround) __lround_power5plus attribute_hidden;
+extern __typeof (__lround) __lround_power6x attribute_hidden;
+
+libc_ifunc (__lround,
+ (hwcap & PPC_FEATURE_POWER6_EXT) ?
+ __lround_power6x
+ : (hwcap & PPC_FEATURE_POWER5_PLUS) ?
+ __lround_power5plus
+ : __lround_ppc32);
+
+weak_alias (__lround, lround)
+
+weak_alias (__lround, lroundf)
+strong_alias(__lround, __lroundf)
+
+#ifdef NO_LONG_DOUBLE
+weak_alias (__lround, lroundl)
+strong_alias (__lround, __lroundl)
+#endif
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __lround, lroundl, GLIBC_2_1);
+#endif
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lroundf.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lroundf.c
new file mode 100644
index 0000000..eb546b4
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_lroundf.c
@@ -0,0 +1 @@
+/* s_lroundf.c is in s_lround.c */
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1e368841229b7c49df432d11502edc095a7120ae
commit 1e368841229b7c49df432d11502edc095a7120ae
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date: Mon Apr 15 07:48:06 2013 -0500
PowerPC: fix s_round Makefile indentation
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
index 20c8dd8..14d3321 100644
--- a/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile
@@ -22,8 +22,8 @@ libm-sysdep_routines += s_llrintf-power6 s_llrintf-power4 s_llrintf-c \
s_floorf-power5+ s_floorf-ppc32 \
s_round-power5+ s_round-ppc32 \
s_roundf-power5+ s_roundf-ppc32 \
- s_trunc-power5+ s_trunc-ppc32 \
- s_truncf-power5+ s_truncf-ppc32
+ s_trunc-power5+ s_trunc-ppc32 \
+ s_truncf-power5+ s_truncf-ppc32
CFLAGS-s_llround.c = -fno-builtin-llroundf
endif
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ff559172d033b0b72b10afe51aeb96aca18427c
commit 6ff559172d033b0b72b10afe51aeb96aca18427c
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date: Mon Apr 15 08:04:30 2013 -0500
PowerPC: llroundf cleanup
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_llroundf-power4.S b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_llroundf-power4.S
deleted file mode 100644
index 9967130..0000000
--- a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_llroundf-power4.S
+++ /dev/null
@@ -1 +0,0 @@
-/* __llroundf_power4 is in s_llround-power4.S */
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_llroundf-power5+.S b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_llroundf-power5+.S
deleted file mode 100644
index 51d760c..0000000
--- a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_llroundf-power5+.S
+++ /dev/null
@@ -1 +0,0 @@
-/* __llroundf_power5+ is in s_llround-power5+.S */
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_llroundf-power6.S b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_llroundf-power6.S
deleted file mode 100644
index adc0699..0000000
--- a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_llroundf-power6.S
+++ /dev/null
@@ -1 +0,0 @@
-/* __llroundf_power6 is in s_llround-power6.S */
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a32627fd54d1fdcbf61423bd2e457ae93ccc2d4e
commit a32627fd54d1fdcbf61423bd2e457ae93ccc2d4e
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date: Mon Apr 15 07:46:47 2013 -0500
PowerPC: llround typo
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_llround.c b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_llround.c
index 6d23aab..33e26ee 100644
--- a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_llround.c
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_llround.c
@@ -22,7 +22,7 @@
#undef llroundf
#define llroundf __redirect_llroundf
#undef __llroundf
-#define __llroundf __redirec___llroundf
+#define __llroundf __redirect___llroundf
#include <math.h>
#undef llroundf
#undef __llroundf
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5022c81c6a1c09a756ca91d019fbc07c91e7dc1
commit a5022c81c6a1c09a756ca91d019fbc07c91e7dc1
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date: Mon Apr 15 07:46:16 2013 -0500
PowerPC: fix wrong s_ceil-ppc32 definitions
diff --git a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_ceil-ppc32.S b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_ceil-ppc32.S
index 81068d5..d69b921 100644
--- a/sysdeps/powerpc/powerpc32/fpu/multiarch/s_ceil-ppc32.S
+++ b/sysdeps/powerpc/powerpc32/fpu/multiarch/s_ceil-ppc32.S
@@ -8,6 +8,6 @@
#undef compat_symbol
#define compat_symbol(a,b,c,d)
-#define __floor __floor_ppc32
+#define __ceil __ceil_ppc32
-#include <sysdeps/powerpc/powerpc32/fpu/s_floor.S>
+#include <sysdeps/powerpc/powerpc32/fpu/s_ceil.S>
-----------------------------------------------------------------------
Summary of changes:
sysdeps/ieee754/dbl-64/s_finite.c | 1 -
sysdeps/ieee754/flt-32/s_finitef.c | 1 -
sysdeps/ieee754/ldbl-128ibm/s_logbl.c | 2 +
sysdeps/powerpc/powerpc32/fpu/multiarch/Makefile | 20 ++++-
.../powerpc/powerpc32/fpu/multiarch/s_ceil-ppc32.S | 4 +-
.../powerpc/powerpc32/fpu/multiarch/s_finite-c.c | 13 +++
.../powerpc32/fpu/multiarch/s_finite-power7.S | 67 ++++++++++++++
sysdeps/powerpc/powerpc32/fpu/multiarch/s_finite.c | 51 +++++++++++
.../powerpc/powerpc32/fpu/multiarch/s_finitef-c.c | 11 +++
.../powerpc/powerpc32/fpu/multiarch/s_finitef.c | 32 +++++++
.../powerpc/powerpc32/fpu/multiarch/s_isinf-c.c | 13 +++
.../powerpc32/fpu/multiarch/s_isinf-power7.S | 66 ++++++++++++++
sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinf.c | 44 +++++++++
.../powerpc/powerpc32/fpu/multiarch/s_isinff-c.c | 11 +++
sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinff.c | 32 +++++++
.../powerpc/powerpc32/fpu/multiarch/s_llround.c | 2 +-
.../powerpc32/fpu/multiarch/s_llroundf-power4.S | 1 -
.../powerpc32/fpu/multiarch/s_llroundf-power5+.S | 1 -
.../powerpc32/fpu/multiarch/s_llroundf-power6.S | 1 -
sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb-c.c | 10 ++
.../powerpc32/fpu/multiarch/s_logb-power7.c | 72 +++++++++++++++
sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb.c | 41 +++++++++
.../powerpc/powerpc32/fpu/multiarch/s_logbf-c.c | 8 ++
.../powerpc32/fpu/multiarch/s_logbf-power7.c | 61 +++++++++++++
sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbf.c | 32 +++++++
.../powerpc/powerpc32/fpu/multiarch/s_logbl-c.c | 7 ++
.../powerpc32/fpu/multiarch/s_logbl-power7.c | 70 +++++++++++++++
sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbl.c | 32 +++++++
.../powerpc32/fpu/multiarch/s_lrint-power6x.S | 28 ++++++
.../powerpc32/fpu/multiarch/s_lrint-ppc32.S | 13 +++
sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrint.c | 52 +++++++++++
sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrintf.c | 1 +
.../powerpc32/fpu/multiarch/s_lround-power5+.S | 44 +++++++++
.../powerpc32/fpu/multiarch/s_lround-power6x.S | 38 ++++++++
.../powerpc32/fpu/multiarch/s_lround-ppc32.S | 13 +++
sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround.c | 55 ++++++++++++
.../powerpc/powerpc32/fpu/multiarch/s_lroundf.c | 1 +
sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S | 57 ------------
sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S | 41 ---------
sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S | 51 -----------
sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S | 94 --------------------
sysdeps/powerpc/powerpc32/power7/fpu/s_finitef.S | 1 -
sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S | 86 ------------------
sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S | 1 -
sysdeps/powerpc/powerpc32/power7/fpu/s_logb.c | 78 ----------------
sysdeps/powerpc/powerpc32/power7/fpu/s_logbf.c | 60 -------------
sysdeps/powerpc/powerpc32/power7/fpu/s_logbl.c | 70 ---------------
47 files changed, 940 insertions(+), 550 deletions(-)
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_finite-c.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_finite-power7.S
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_finite.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_finitef-c.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_finitef.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinf-c.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinf-power7.S
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinf.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinff-c.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_isinff.c
delete mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_llroundf-power4.S
delete mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_llroundf-power5+.S
delete mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_llroundf-power6.S
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb-c.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb-power7.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_logb.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbf-c.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbf-power7.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbf.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbl-c.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbl-power7.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_logbl.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrint-power6x.S
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrint-ppc32.S
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrint.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_lrintf.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround-power5+.S
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround-power6x.S
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround-ppc32.S
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_lround.c
create mode 100644 sysdeps/powerpc/powerpc32/fpu/multiarch/s_lroundf.c
delete mode 100644 sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S
delete mode 100644 sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S
delete mode 100644 sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S
delete mode 100644 sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
delete mode 100644 sysdeps/powerpc/powerpc32/power7/fpu/s_finitef.S
delete mode 100644 sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S
delete mode 100644 sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S
delete mode 100644 sysdeps/powerpc/powerpc32/power7/fpu/s_logb.c
delete mode 100644 sysdeps/powerpc/powerpc32/power7/fpu/s_logbf.c
delete mode 100644 sysdeps/powerpc/powerpc32/power7/fpu/s_logbl.c
hooks/post-receive
--
GNU C Library master sources