This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Disable x87 inline functions for SSE2 math


On Wed, Jan 29, 2014 at 08:02:58AM -0800, H.J. Lu wrote:
>  * Slovenian translations for glibc messages have been contributed by the
>    Translation Project's Slovenian team of translators.
> diff --git a/sysdeps/x86/fpu/bits/mathinline.h b/sysdeps/x86/fpu/bits/mathinline.h
> index acc82ca..b4b28f3 100644
> --- a/sysdeps/x86/fpu/bits/mathinline.h
> +++ b/sysdeps/x86/fpu/bits/mathinline.h
> @@ -384,7 +384,7 @@ __END_NAMESPACE_C99
>  # endif
>  #endif
>  
> -#ifndef __x86_64__
> +#ifndef __SSE2_MATH__
>  # if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
>       && defined __OPTIMIZE__)
>  
> @@ -970,4 +970,4 @@ __inline_mathcode2 (__ieee754_atan2, __y, __x,
>  		    return __value;)
>  # endif
>  
> -#endif /* !__x86_64__ */
> +#endif /* !__SSE2_MATH__ */

This looks OK to me.

llrint* still spews out only x87 code (looks like the compiler does
this, since we don't have anything useful for llrint for SSE in
glibc), which seems obvious since we can't get a 64-bit value from
cvt*2si directly in 32-bit mode.  Maybe some hack is necessary here
since in case of an inexact conversion, the rounding will not be
according to the set rounding mode since we don't maintain x87 FP
state when SSE is available.

Siddhesh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]