Move internal functions on i386 from mathinline.h to math_private.h
Andreas Jaeger
aj@suse.com
Tue May 22 19:54:00 GMT 2012
Ping?
Andreas
On 05/03/2012 10:09 PM, Andreas Jaeger wrote:
>
> This patch removes two internal declarations from the exported
> bits/mathinline.h header to math_private.
>
> I had to expand the macros since mathinline.h is not always included
> when math_private.h gets included.
>
> Tested on Linux/i686.
>
> Ok to commit?
>
> Andreas
>
> 2012-05-03 Andreas Jaeger<aj@suse.de>
>
> * sysdeps/i386/fpu/bits/mathinline.h
> [__LIBC_INTERNAL_MATH_INLINES] (__iee754_sqrt): Removed.
> [__LIBC_INTERNAL_MATH_INLINES] (__iee754_atan2): Removed.
> * sysdeps/i386/fpu/math_private.h (__ieee754_sqrtf): New.
> (__ieee754_sqrt): Likewise.
> (__ieee754_sqrtl): Likewise.
> (__ieee754_atan2f): Likewise.
> (__ieee754_atan2): Likewise.
> (__ieee754_atan2l): Likewise.
>
> diff --git a/sysdeps/i386/fpu/bits/mathinline.h b/sysdeps/i386/fpu/bits/mathinline.h
> index 6561eba..e27fc40 100644
> --- a/sysdeps/i386/fpu/bits/mathinline.h
> +++ b/sysdeps/i386/fpu/bits/mathinline.h
> @@ -755,16 +755,4 @@ __inline_mathcode (__acosh1p, __x, \
>
> #endif /* __NO_MATH_INLINES */
>
> -
> -/* This code is used internally in the GNU libc. */
> -#ifdef __LIBC_INTERNAL_MATH_INLINES
> -__inline_mathop (__ieee754_sqrt, "fsqrt")
> -__inline_mathcode2 (__ieee754_atan2, __y, __x,
> - register long double __value;
> - __asm __volatile__ ("fpatan\n\t"
> - : "=t" (__value)
> - : "0" (__x), "u" (__y) : "st(1)");
> - return __value;)
> -#endif
> -
> #endif /* __GNUC__ */
> diff --git a/sysdeps/i386/fpu/math_private.h b/sysdeps/i386/fpu/math_private.h
> index 541a7f8..efde1c1 100644
> --- a/sysdeps/i386/fpu/math_private.h
> +++ b/sysdeps/i386/fpu/math_private.h
> @@ -3,4 +3,67 @@
> #include "fenv_private.h"
> #include_next<math_private.h>
>
> +extern __inline double __ieee754_sqrt (double) __THROW;
> +
> +extern __inline double
> +__ieee754_sqrt (double __x)
> +{
> + register double __result;
> + __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x));
> + return __result;
> +}
> +extern __inline float __ieee754_sqrtf (float) __THROW;
> +
> +extern __inline float
> +__ieee754_sqrtf (float __x)
> +{
> + register float __result;
> + __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x));
> +return __result;
> +}
> +
> +extern __inline long double __ieee754_sqrtl (long double) __THROW;
> +
> +extern __inline long double
> +__ieee754_sqrtl (long double __x)
> +{
> + register long double __result;
> + __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x));
> + return __result;
> +}
> +
> +extern __inline double __ieee754_atan2 (double, double) __THROW;
> +
> +extern __inline double
> +__ieee754_atan2 (double __y, double __x)
> +{
> + register long double __value;
> + __asm __volatile__ ("fpatan"
> + : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)");
> + return __value;
> +}
> +
> +extern __inline float __ieee754_atan2f (float, float) __THROW;
> +
> +extern __inline float
> +__ieee754_atan2f (float __y, float __x)
> +{
> + register long double __value;
> + __asm __volatile__ ("fpatan"
> + : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)");
> + return __value;
> +}
> +
> +extern __inline long double __ieee754_atan2l (long double, long double) __THROW;
> +
> +extern __inline long double
> +__ieee754_atan2l (long double __y, long double __x)
> +{
> + register long double __value;
> + __asm __volatile__ ("fpatan"
> + : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)");
> + return __value;
> +}
> +
> +
> #endif
>
--
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
More information about the Libc-alpha
mailing list