This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

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


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.  */

Attachment: gcc-trunk-x86-mmintrin.patch
Description: Text document


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