Optimize out duplicated scalbln code for x86-64.

This commit is contained in:
Ulrich Drepper 2009-08-25 16:46:34 -07:00
parent e9f145cba8
commit 65b14bcee2
4 changed files with 21 additions and 7 deletions

View File

@ -4,7 +4,10 @@
2009-08-25 Ulrich Drepper <drepper@redhat.com>
* sysdeps/ieee754/dbl-64/wordsize-64/s_scalbln.c: New file.
* sysdeps/x86_64/fpu/s_scalbln.c: New file.
* sysdeps/x86_64/fpu/s_scalbn.c: New file.
* sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c: New file.
* sysdeps/x86_64/fpu/s_signbit.S: New file.
* sysdeps/x86_64/fpu/s_signbitf.S: New file.

View File

@ -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

View File

@ -0,0 +1,2 @@
/* Nothing to do. This function is the same as scalbn. So we define an
alias. */

View File

@ -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)