[PATCH] Re: [PATCH] x86: disable use of paddq and psubq without SSE2 support

Jan Beulich JBeulich@novell.com
Fri Dec 9 07:41:00 GMT 2005


This fixes the 32-bit x86 MMX testsuite failures.

Bootstrapped and tested on i686-pc-linux-gnu.

2005-12-09  Jan Beulich  <jbeulich@novell.com>

	* config/i386/mmintrin.m (_mm_add_si64, _mm_sub_si64):
Conditionalize
	upon __SSE2__.

---
/home/jbeulich/src/gcc/trunk/2005-12-07/gcc/config/i386/mmintrin.h	2005-12-01
10:48:33.000000000 +0100
+++ 2005-12-07/gcc/config/i386/mmintrin.h	2005-12-08
09:21:32.424278560 +0100
@@ -273,12 +273,14 @@ _m_paddd (__m64 __m1, __m64 __m2)
   return _mm_add_pi32 (__m1, __m2);
 }
 
+#ifdef __SSE2__
 /* Add the 64-bit values in M1 to the 64-bit values in M2.  */
 static __inline __m64 __attribute__((__always_inline__))
 _mm_add_si64 (__m64 __m1, __m64 __m2)
 {
   return (__m64) __builtin_ia32_paddq ((long long)__m1, (long
long)__m2);
 }
+#endif
 
 /* Add the 8-bit values in M1 to the 8-bit values in M2 using signed
    saturated arithmetic.  */
@@ -375,12 +377,14 @@ _m_psubd (__m64 __m1, __m64 __m2)
   return _mm_sub_pi32 (__m1, __m2);
 }
 
+#ifdef __SSE2__
 /* Add the 64-bit values in M1 to the 64-bit values in M2.  */
 static __inline __m64 __attribute__((__always_inline__))
 _mm_sub_si64 (__m64 __m1, __m64 __m2)
 {
   return (__m64) __builtin_ia32_psubq ((long long)__m1, (long
long)__m2);
 }
+#endif
 
 /* Subtract the 8-bit values in M2 from the 8-bit values in M1 using
signed
    saturating arithmetic.  */

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gcc-trunk-x86-mmintrin.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051209/4627795d/attachment.ksh>


More information about the Gcc-patches mailing list