]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mmintrin.h (_mm_add_si64): Only define for SSE2.
authorRichard Henderson <rth@gcc.gnu.org>
Fri, 23 Dec 2005 00:31:44 +0000 (16:31 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 23 Dec 2005 00:31:44 +0000 (16:31 -0800)
        * config/i386/mmintrin.h (_mm_add_si64): Only define for SSE2.
        (_mm_sub_si64): Likewise.
        * config/i386/xmmintrin.h (_mm_shuffle_pi16, _m_pshufw): Likewise.

        * gcc.target/i386/sse-7.c: Use -msse2.

From-SVN: r108996

gcc/ChangeLog
gcc/config/i386/mmintrin.h
gcc/config/i386/xmmintrin.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/sse-7.c

index 0ee56c05528df0e032bb7690df60cecab520aa84..2c592a262c3f9c960ec996494eb779023127e21d 100644 (file)
@@ -1,3 +1,9 @@
+2005-12-22  Richard Henderson  <rth@redhat.com>
+
+       * config/i386/mmintrin.h (_mm_add_si64): Only define for SSE2.
+       (_mm_sub_si64): Likewise.
+       * config/i386/xmmintrin.h (_mm_shuffle_pi16, _m_pshufw): Likewise.
+
 2005-12-23  Alan Modra  <amodra@bigpond.net.au>
 
        PR rtl-optimization/25432
 2005-12-06  Jan Beulich  <jbeulich@novell.com>
 
        * config/i386/i386.c (builtin_description): Use MASK_SSE2 for
-       __builtin_ia32_paddq and __builtin_ia32_subq.
+       __builtin_ia32_paddq and __builtin_ia32_psubq.
        (ix86_init_mmx_sse_builtins): Use MASK_SSE|MASK_3DNOW_A for
        __builtin_ia32_pshufw.
        * config/i386/i386.md (mmx_adddi3, mmx_subdi3): Depend on TARGET_SSE2.
index 252364b803e115547168129fabe0c451f89801a0..b98caf0cac2231646e68b7ffc7f9e6b160acdabe 100644 (file)
@@ -274,11 +274,13 @@ _m_paddd (__m64 __m1, __m64 __m2)
 }
 
 /* Add the 64-bit values in M1 to the 64-bit values in M2.  */
+#ifdef __SSE2__
 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.  */
@@ -376,11 +378,13 @@ _m_psubd (__m64 __m1, __m64 __m2)
 }
 
 /* Add the 64-bit values in M1 to the 64-bit values in M2.  */
+#ifdef __SSE2__
 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.  */
index 99790b06420223e407ab776cb0d39cf88857ce2f..20c41c739d54d3244d0b5659ea8eadedead3690a 100644 (file)
@@ -1075,6 +1075,7 @@ _m_pmulhuw (__m64 __A, __m64 __B)
 
 /* Return a combination of the four 16-bit values in A.  The selector
    must be an immediate.  */
+#ifdef __SSE2__
 #if 0
 static __inline __m64 __attribute__((__always_inline__))
 _mm_shuffle_pi16 (__m64 __A, int __N)
@@ -1092,6 +1093,7 @@ _m_pshufw (__m64 __A, int __N)
   ((__m64) __builtin_ia32_pshufw ((__v4hi)(A), (N)))
 #define _m_pshufw(A, N)                _mm_shuffle_pi16 ((A), (N))
 #endif
+#endif
 
 /* Conditionally store byte elements of A into P.  The high bit of each
    byte in the selector N determines whether the corresponding byte from
index 23222eabd9ef760902fb4f361e063fff3e4adc5c..078c5417bae0ab3882a0faafc1a7633c39b8917a 100644 (file)
@@ -1,3 +1,7 @@
+2005-12-22  Richard Henderson  <rth@redhat.com>
+
+       * gcc.target/i386/sse-7.c: Use -msse2.
+
 2005-12-23  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/25432
index 3d4d1ec45fac9ccb634c7e07db5a4fc9e5f6e4fc..41e771e696a7189df3e98b8f2e4a311fd5d199f7 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2 -msse" } */
+/* { dg-options "-O2 -msse2" } */
 #include <xmmintrin.h>
 #include <stdio.h>
 #include <stdlib.h>