PATCH: Disable x87 inline functions for x86-64

Andreas Jaeger aj@suse.com
Fri Jun 15 19:24:00 GMT 2012


On 06/15/2012 03:58 PM, H.J. Lu wrote:
> On Thu, Jun 14, 2012 at 5:14 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Thu, Jun 14, 2012 at 11:19 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Thu, Jun 14, 2012 at 11:01 AM, Roland McGrath <roland@hack.frob.com> wrote:
>>>> I think this is probably OK, but I just don't know that much about the area.
>>>> Does this leave any function that previously had an inline and now has none?
>>>>
>>>> The GCC manual seems to indicate that -mfpath=sse -msse (without -msse2)
>>>> will use x87 code for double-precision operations.  So it seems appropriate
>>>> that this mode have x87 inlines for double libm calls too.
>>>
>>> It makes no difference for x86-64 since SSE2 is available.
>>> But it will change ia32. I think it is too late for 2.16.
>>>
>>> Here is the updated patch to only disable x87 inline functions for x86-64.
>>> It makes -m32 and -m64 behave the same as before.  OK to install?
>>>
>>> Thanks.
>>
>
> Here is a revised patch.  The output from "git diff -w" is:
>
> diff --git a/sysdeps/i386/fpu/bits/mathinline.h
> b/sysdeps/i386/fpu/bits/mathinline.h
> index 5ee40a3..6446b1d 100644
> --- a/sysdeps/i386/fpu/bits/mathinline.h
> +++ b/sysdeps/i386/fpu/bits/mathinline.h
> @@ -380,7 +380,9 @@ __NTH (floorf (float __x))
>   __END_NAMESPACE_C99
>   #  endif
>   # endif
> +#endif
>
> +#ifndef __x86_64__
>   #if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
>        && defined __OPTIMIZE__)
>
> @@ -963,4 +965,4 @@ __inline_mathcode2 (__ieee754_atan2, __y, __x,
>   		    return __value;)
>   #endif
>
> -#endif /* __GNUC__  */
> +#endif /* !__x86_64__ */
>
> The rest is re-indenting.   OK to install?


This looks fine to me.

Thanks,
Andreas
-- 
  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