aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/i386/mmintrin.h4
-rw-r--r--gcc/config/i386/xmmintrin.h2
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-7.c2
5 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0ee56c0..2c592a2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
@@ -2213,7 +2219,7 @@
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.
diff --git a/gcc/config/i386/mmintrin.h b/gcc/config/i386/mmintrin.h
index 252364b..b98caf0 100644
--- a/gcc/config/i386/mmintrin.h
+++ b/gcc/config/i386/mmintrin.h
@@ -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. */
diff --git a/gcc/config/i386/xmmintrin.h b/gcc/config/i386/xmmintrin.h
index 99790b0..20c41c7 100644
--- a/gcc/config/i386/xmmintrin.h
+++ b/gcc/config/i386/xmmintrin.h
@@ -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
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 23222ea..078c541 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/gcc.target/i386/sse-7.c b/gcc/testsuite/gcc.target/i386/sse-7.c
index 3d4d1ec..41e771e 100644
--- a/gcc/testsuite/gcc.target/i386/sse-7.c
+++ b/gcc/testsuite/gcc.target/i386/sse-7.c
@@ -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>