aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-08-25 16:46:34 -0700
committerUlrich Drepper <drepper@redhat.com>2009-08-25 16:46:34 -0700
commit65b14bcee2da7f56299357d1dab9f0ab986c2255 (patch)
tree2e7f47d06477f7a0526e0a6f1ebaa4c25441a0d1 /sysdeps
parente9f145cba8691a81dac379914bb3895360795a9b (diff)
downloadglibc-65b14bcee2da7f56299357d1dab9f0ab986c2255.tar
glibc-65b14bcee2da7f56299357d1dab9f0ab986c2255.tar.gz
glibc-65b14bcee2da7f56299357d1dab9f0ab986c2255.tar.bz2
glibc-65b14bcee2da7f56299357d1dab9f0ab986c2255.zip
Optimize out duplicated scalbln code for x86-64.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c (renamed from sysdeps/ieee754/dbl-64/wordsize-64/s_scalbln.c)12
-rw-r--r--sysdeps/x86_64/fpu/s_scalbln.c2
-rw-r--r--sysdeps/x86_64/fpu/s_scalbn.c9
3 files changed, 17 insertions, 6 deletions
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbln.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c
index 25b283f288..25cf3b1699 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbln.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c
@@ -31,10 +31,10 @@ huge = 1.0e+300,
tiny = 1.0e-300;
#ifdef __STDC__
- double __scalbln (double x, long int n)
+ double __scalbn (double x, int n)
#else
- double __scalbln (x,n)
- double x; long int n;
+ double __scalbn (x,n)
+ double x; int n;
#endif
{
int64_t ix;
@@ -61,8 +61,8 @@ tiny = 1.0e-300;
INSERT_WORDS64(x,(ix&INT64_C(0x800fffffffffffff))|(k<<52));
return x*twom54;
}
-weak_alias (__scalbln, scalbln)
+weak_alias (__scalbn, scalbn)
#ifdef NO_LONG_DOUBLE
-strong_alias (__scalbln, __scalblnl)
-weak_alias (__scalbln, scalblnl)
+strong_alias (__scalbn, __scalbnl)
+weak_alias (__scalbn, scalbnl)
#endif
diff --git a/sysdeps/x86_64/fpu/s_scalbln.c b/sysdeps/x86_64/fpu/s_scalbln.c
new file mode 100644
index 0000000000..1009713fbc
--- /dev/null
+++ b/sysdeps/x86_64/fpu/s_scalbln.c
@@ -0,0 +1,2 @@
+/* Nothing to do. This function is the same as scalbn. So we define an
+ alias. */
diff --git a/sysdeps/x86_64/fpu/s_scalbn.c b/sysdeps/x86_64/fpu/s_scalbn.c
new file mode 100644
index 0000000000..74d34655ad
--- /dev/null
+++ b/sysdeps/x86_64/fpu/s_scalbn.c
@@ -0,0 +1,9 @@
+#define scalbln __renamed_scalbln
+#define __scalbln __renamed___scalbln
+
+#include <sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c>
+
+#undef scalbln
+#undef __scalbln
+strong_alias (__scalbn, __scalbln)
+weak_alias (__scalbn, scalbln)