This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Disable x87 inline functions when SSE math is enabled
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 14 Jun 2012 10:38:05 -0700
- Subject: Re: PATCH: Disable x87 inline functions when SSE math is enabled
- References: <20120612181621.GA29440@intel.com>
On Tue, Jun 12, 2012 at 11:16 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> Hi,
>
> This patch disables x87 inline functions when SSE math is enabled. ?OK
> to install?
>
> Thanks.
>
>
> H.J.
> ---
> ? ? ? ?[BZ #14050]
> ? ? ? ?[BZ #14117]
> ? ? ? ?* sysdeps/i386/fpu/bits/mathinline.h: Disable x87 inline
> ? ? ? ?functions if __SSE_MATH__ is defined.
>
> diff --git a/sysdeps/i386/fpu/bits/mathinline.h b/sysdeps/i386/fpu/bits/mathinline.h
> index 5ee40a3..c784067 100644
> --- a/sysdeps/i386/fpu/bits/mathinline.h
> +++ b/sysdeps/i386/fpu/bits/mathinline.h
> @@ -381,12 +381,13 @@ __END_NAMESPACE_C99
> ?# ?endif
> ?# endif
>
> -#if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
> - ? ? && defined __OPTIMIZE__)
> +# if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
> + ? ? && !defined __SSE_MATH__ && defined __OPTIMIZE__)
> +/* Not used by SSE math. ?*/
>
Any comments? If people are nervous about !defined __SSE_MATH__,
I can change it to !defined __x86_64__, which will preserve the
old behavior for -m32.
Thanks.
--
H.J.