This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: target/i386: make _mm_shuffle_pi16() available for SSE
- From: Dirk Mueller <dmueller at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 15 Apr 2006 13:52:04 +0200
- Subject: PATCH: target/i386: make _mm_shuffle_pi16() available for SSE
Hi,
This basically reverts a part of r108996, done by rth on 2005-12-23. pshufw is
a SSE and a 3dnowA instruction, and therefore doesn't need SSE2 support. The
builtin is correctly tagged as SSE, therefore the prototype should be
available then as well.
bootstrapped/regtested with no additional failures. Ok for trunk?
2006-04-15 Dirk Mueller <dmueller@suse.de>
* config/i386/xmmintrin.h (_mm_shuffle_pi16): make available
for SSE.
* testsuite/gcc.target/i386/sse-7.c : build with -msse
Index: testsuite/gcc.target/i386/sse-7.c
===================================================================
--- testsuite/gcc.target/i386/sse-7.c (Revision 112898)
+++ testsuite/gcc.target/i386/sse-7.c (Arbeitskopie)
@@ -1,5 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2 -msse2" } */
+/* { dg-options "-O2 -msse" } */
#include <xmmintrin.h>
#include <stdio.h>
#include <stdlib.h>
Index: config/i386/xmmintrin.h
===================================================================
--- config/i386/xmmintrin.h (Revision 112898)
+++ config/i386/xmmintrin.h (Arbeitskopie)
@@ -1109,7 +1109,6 @@
/* 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)
@@ -1127,7 +1126,6 @@
((__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