PATCH: Support inline SSE/SSE2

H. J. Lu hjl@lucon.org
Tue Nov 25 21:01:00 GMT 2003


On Tue, Nov 25, 2003 at 07:43:11PM +0100, Jakub Jelinek wrote:
> 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
> 
> 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.
> 

Here is the new one.

H.J.
----
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.

--- sysdeps/i386/fpu/bits/mathinline.h.sse	2003-11-24 14:04:07.000000000 -0800
+++ sysdeps/i386/fpu/bits/mathinline.h	2003-11-24 14:10:28.000000000 -0800
@@ -439,8 +439,10 @@ __inline_mathcodeNP2 (fmod, __x, __y, \
 
 
 #ifdef __FAST_MATH__
+# if !__GNUC_PREREQ (3,3)
 __inline_mathopNP (sqrt, "fsqrt")
 __inline_mathopNP_ (long double, __sqrtl, "fsqrt")
+# endif
 #endif
 
 #if __GNUC_PREREQ (2, 8)



More information about the Libc-alpha mailing list