This is the mail archive of the libc-alpha@sources.redhat.com 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: Support inline SSE/SSE2


On Tue, Nov 25, 2003 at 12:35:46PM -0800, H. J. Lu wrote:
> 2003-11-25  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	* sysdeps/i386/fpu/bits/mathinline.h (sqrt): Don't inline
> 	sqrt for gcc 3.3 and above if SSE2 is enabled
> 
> --- bits/mathinline.h.orig	2003-11-24 16:13:44.000000000 -0800
> +++ bits/mathinline.h	2003-11-25 12:05:14.000000000 -0800
> @@ -439,8 +439,10 @@ __inline_mathcodeNP2 (fmod, __x, __y, \
>  
>  
>  #ifdef __FAST_MATH__
> +# if !__GNUC_PREREQ (3,3) || !defined __SSE2__
>  __inline_mathopNP (sqrt, "fsqrt")
>  __inline_mathopNP_ (long double, __sqrtl, "fsqrt")
> +# endif
>  #endif

Why the || !defined __SSE2__ part there?
GCC 3.3+ has __builtin_sqrt{,f,l} and should generate the best -ffast-math
code no matter whether -msse2 or not.  It will generate fsqrt too when
it thinks it is beneficial.

	Jakub


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