diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-05-19 23:27:48 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-05-19 23:27:48 +0000 |
commit | 4dfac92d1fc314bd486fc106f8bdf8a0891d8133 (patch) | |
tree | a29219692e016070f64d880d86e5979aab82e17c /gcc/testsuite/gcc.target/i386/sse-13.c | |
parent | 2e3dc2c9fc8c9a422aabd64641184de3bcf92563 (diff) | |
download | gcc-4dfac92d1fc314bd486fc106f8bdf8a0891d8133.tar.gz |
PR target/31585
* config/i386/pmmintrin.h: Do not include xmmintrin.h
* config/i386/xmmintrin.h (_mm_extract_pi16): Implement as always
inlined function, not as a macro.
(_mm_prefetch): Ditto.
(_m_pextrw): Ditto.
(_mm_insert_pi16): Ditto.
(_m_pinsrw): Ditto.
(_mm_shuffle_pi16): Ditto. Add const to __N argument.
(_m_pshufw): Ditto. Add const to __N argument.
(_mm_shufle_ps): Ditto. Add const to __mask argument.
* config/i386/emmintrin.h (_mm_slli_epi16): Add const to __B argument.
(_mm_slli_epi32): Ditto.
(_mm_srli_si128): Implement as always inlined function, not as a macro.
Add __inline to function declaration.
(_mm_slli_si128): Ditto.
testsuite/ChangeLog:
PR target/31585
* gcc.target/i386/sse-13.c: Use -mssse3 and -msse4a compile options.
(__builtin_ia32_psllwi128): Redefine to test with immediate operand.
(__builtin_ia32_psrlqi128): Ditto.
(__builtin_ia32_psrlwi128): Ditto.
(__builtin_ia32_psrldi128): Ditto.
(__builtin_ia32_psrldqi128): Ditto.
(__builtin_ia32_pslldqi128): Ditto.
(__builtin_ia32_psrawi128): Ditto.
(__builtin_ia32_psradi128): Ditto.
(__builtin_ia32_psllqi128): Ditto.
(__builtin_ia32_pslldi128): Ditto.
(__builtin_prefetch): Ditto.
(__builtin_ia32_pshufw): Ditto.
(__builtin_ia32_vec_set_v4hi): Ditto.
(__builtin_ia32_vec_ext_v4hi): Ditto.
(__builtin_ia32_shufps): Ditto.
* gcc.target/i386/sse-14.c: Same changes as sse-13.c.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124861 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/sse-13.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/sse-13.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.target/i386/sse-13.c b/gcc/testsuite/gcc.target/i386/sse-13.c index 1f657e1f273..6bba000e868 100644 --- a/gcc/testsuite/gcc.target/i386/sse-13.c +++ b/gcc/testsuite/gcc.target/i386/sse-13.c @@ -1,5 +1,5 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ -/* { dg-options "-O2 -msse" } */ +/* { dg-options "-O2 -mssse3 -msse4a" } */ /* Test that the intrinsics compile with optimization. All of them are defined as inline functions in mmintrin.h that reference the proper @@ -9,4 +9,27 @@ #define static #define __inline -#include <xmmintrin.h> +/* Following intrinsics require immediate arguments. */ + +/* emmintrin.h */ +#define __builtin_ia32_psllwi128(A, B) __builtin_ia32_psllwi128(A, 1) +#define __builtin_ia32_psrlqi128(A, B) __builtin_ia32_psrlqi128(A, 1) +#define __builtin_ia32_psrlwi128(A, B) __builtin_ia32_psrlwi128(A, 1) +#define __builtin_ia32_psrldi128(A, B) __builtin_ia32_psrldi128(A, 1) +#define __builtin_ia32_psrldqi128(A, B) __builtin_ia32_psrldqi128(A, 8) +#define __builtin_ia32_pslldqi128(A, B) __builtin_ia32_pslldqi128(A, 8) +#define __builtin_ia32_psrawi128(A, B) __builtin_ia32_psrawi128(A, 1) +#define __builtin_ia32_psradi128(A, B) __builtin_ia32_psradi128(A, 1) +#define __builtin_ia32_psllqi128(A, B) __builtin_ia32_psllqi128(A, 1) +#define __builtin_ia32_pslldi128(A, B) __builtin_ia32_pslldi128(A, 1) + +/* xmmintrin.h */ +#define __builtin_prefetch(P, A, I) __builtin_prefetch(P, A, _MM_HINT_NTA) +#define __builtin_ia32_pshufw(A, N) __builtin_ia32_pshufw(A, 0) +#define __builtin_ia32_vec_set_v4hi(A, D, N) \ + __builtin_ia32_vec_set_v4hi(A, D, 0) +#define __builtin_ia32_vec_ext_v4hi(A, N) __builtin_ia32_vec_ext_v4hi(A, 0) +#define __builtin_ia32_shufps(A, B, C) __builtin_ia32_shufps(A, B, 0) + +#include <ammintrin.h> +#include <tmmintrin.h> |