This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Remove unused functions from i386/mathinline.h
- From: Andreas Jaeger <aj at suse dot de>
- To: libc-alpha at sources dot redhat dot com
- Date: Thu, 03 May 2012 15:39:35 +0200
- Subject: [PATCH] Remove unused functions from i386/mathinline.h
I went through mathinline.h and noticed four functions that were not
used anywhere in glibc, so I propose to remove them.
Tested on Linux/x86
Ok to commit?
Andreas
2012-05-03 Andreas Jaeger <aj@suse.de>
* sysdeps/i386/fpu/bits/mathinline.h (__pow2): Remove,
it's not used in glibc.
(__coshm1): Likewise.
(__acosh1p): Likewise.
diff --git a/sysdeps/i386/fpu/bits/mathinline.h b/sysdeps/i386/fpu/bits/mathinline.h
index 6561eba..9f3a85f 100644
--- a/sysdeps/i386/fpu/bits/mathinline.h
+++ b/sysdeps/i386/fpu/bits/mathinline.h
@@ -295,29 +295,6 @@ __inline_mathcode (__sgn, __x, \
/* __FAST_MATH__ is defined by gcc -ffast-math. */
#ifdef __FAST_MATH__
-__inline_mathcode (__pow2, __x, \
- register long double __value; \
- register long double __exponent; \
- __extension__ long long int __p = (long long int) __x; \
- if (__x == (long double) __p) \
- { \
- __asm __volatile__ \
- ("fscale" \
- : "=t" (__value) : "0" (1.0), "u" (__x)); \
- return __value; \
- } \
- __asm __volatile__ \
- ("fld %%st(0)\n\t" \
- "frndint # int(x)\n\t" \
- "fxch\n\t" \
- "fsub %%st(1) # fract(x)\n\t" \
- "f2xm1 # 2^(fract(x)) - 1\n\t" \
- : "=t" (__value), "=u" (__exponent) : "0" (__x)); \
- __value += 1.0; \
- __asm __volatile__ \
- ("fscale" \
- : "=t" (__value) : "0" (__value), "u" (__exponent)); \
- return __value)
# ifdef __USE_GNU
# define __sincos_code \
@@ -733,16 +710,6 @@ __NTH (__finite (double __x))
| 0x800fffffu) + 1) >> 31));
}
-/* Miscellaneous functions */
-# ifdef __FAST_MATH__
-__inline_mathcode (__coshm1, __x, \
- register long double __exm1 = __expm1l (__fabsl (__x)); \
- return 0.5 * (__exm1 / (__exm1 + 1.0)) * __exm1)
-
-__inline_mathcode (__acosh1p, __x, \
- return log1pl (__x + __libc_sqrtl (__x) * __libc_sqrtl (__x + 2.0)))
-
-# endif /* __FAST_MATH__ */
#endif /* __USE_MISC */
/* Undefine some of the large macros which are not used anymore. */
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 NÃrnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix ImendÃrffer,HRB16746 (AG NÃrnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126