summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/sse-13.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-14 16:45:11 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-14 16:45:11 +0000
commit39021f29d31a4390c2ce936c5623c0650d0bbaa9 (patch)
tree61d0e6114c05f06f2f2405ea6968aec76e33d5ae /gcc/testsuite/gcc.target/i386/sse-13.c
parent7a35ccd0bcaa66dc2442bac8690c51a52095363d (diff)
downloadgcc-39021f29d31a4390c2ce936c5623c0650d0bbaa9.tar.gz
Fix LWP.
2009-12-14 Jakub Jelinek <jakub@redhat.com> Sebastian Pop <sebastian.pop@amd.com> * config/i386/i386-builtin-types.def (PVOID): Declared. (VOID_FTYPE_PVOID): Declared. (PVOID_FTYPE_VOID): Declared. (UCHAR_FTYPE_USHORT_UINT_USHORT): Removed. (VOID_FTYPE_USHORT_UINT_USHORT): Removed. * config/i386/i386.c (IX86_BUILTIN_LLWPCB16, IX86_BUILTIN_LLWPCB32, IX86_BUILTIN_LLWPCB64, IX86_BUILTIN_SLWPCB16, IX86_BUILTIN_SLWPCB32, IX86_BUILTIN_SLWPCB64, IX86_BUILTIN_LWPVAL16, IX86_BUILTIN_LWPINS16): Removed. (IX86_BUILTIN_LLWPCB, IX86_BUILTIN_SLWPCB): New. (bdesc_special_args): Adjust declaration of __builtin_ia32_llwpcb, __builtin_ia32_slwpcb, __builtin_ia32_lwpval32, __builtin_ia32_lwpval64, __builtin_ia32_lwpins32, and __builtin_ia32_lwpins64. (ix86_expand_special_args_builtin): Handle VOID_FTYPE_PVOID. Do not handle VOID_FTYPE_USHORT_UINT_USHORT and UCHAR_FTYPE_USHORT_UINT_USHORT. Warn when the third operand is not an immediate. Also handle builtin functions with 3 arguments. (ix86_expand_builtin): Handle IX86_BUILTIN_LLWPCB and IX86_BUILTIN_SLWPCB. * config/i386/i386.md (UNSPEC_LLWP_INTRINSIC, UNSPEC_SLWP_INTRINSIC): Renamed UNSPECV_LLWP_INTRINSIC and UNSPECV_SLWP_INTRINSIC. (memory attribute): Handle lwp. (lwp*): Rewrite all the insn patterns for LWP. * config/i386/lwpintrin.h (__llwpcb16, __llwpcb32, __llwpcb64, __slwpcb16, __slwpcb32, __slwpcb64, __lwpval16, __lwpins16): Removed. (__llwpcb, __slwpcb): New. testsuite/ * gcc.target/i386/sse-12.c: Add -mpopcnt and -mlwp. * gcc.target/i386/sse-13.c: Same. (__builtin_ia32_lwpval32, __builtin_ia32_lwpval64, __builtin_ia32_lwpins32, __builtin_ia32_lwpins64): Added testcases. * gcc.target/i386/sse-14.c: Add -mpopcnt -mabm -mlwp. Added tests for __lwpval32, __lwpins32, __lwpval64, and __lwpins64. * gcc.target/i386/sse-22.c: Added tests for popcnt, abm, and lwp. * gcc.target/i386/sse-23.c: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155217 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.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/gcc/testsuite/gcc.target/i386/sse-13.c b/gcc/testsuite/gcc.target/i386/sse-13.c
index 546a99fdc08..96214e02280 100644
--- a/gcc/testsuite/gcc.target/i386/sse-13.c
+++ b/gcc/testsuite/gcc.target/i386/sse-13.c
@@ -1,13 +1,14 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -m3dnow -mavx -mxop -maes -mpclmul -mabm" } */
+/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -m3dnow -mavx -mxop -maes -mpclmul -mpopcnt -mabm -mlwp" } */
#include <mm_malloc.h>
/* Test that the intrinsics compile with optimization. All of them
are defined as inline functions in {,x,e,p,t,s,w,a,b,i}mmintrin.h,
- xopintrin.h, abmintrin.h and mm3dnow.h that reference the proper
- builtin functions. Defining away "extern" and "__inline" results
- in all of them being compiled as proper functions. */
+ xopintrin.h, abmintrin.h, lwpintrin.h, popcntintrin.h and mm3dnow.h
+ that reference the proper builtin functions. Defining away
+ "extern" and "__inline" results in all of them being compiled as
+ proper functions. */
#define extern
#define __inline
@@ -127,9 +128,15 @@
#define __builtin_ia32_shufps(A, B, N) __builtin_ia32_shufps(A, B, 0)
/* xopintrin.h */
-#define __builtin_ia32_vprotbi(A, N) __builtin_ia32_vprotbi (A,1)
-#define __builtin_ia32_vprotwi(A, N) __builtin_ia32_vprotwi (A,1)
-#define __builtin_ia32_vprotdi(A, N) __builtin_ia32_vprotdi (A,1)
-#define __builtin_ia32_vprotqi(A, N) __builtin_ia32_vprotqi (A,1)
+#define __builtin_ia32_vprotbi(A, N) __builtin_ia32_vprotbi (A,1)
+#define __builtin_ia32_vprotwi(A, N) __builtin_ia32_vprotwi (A,1)
+#define __builtin_ia32_vprotdi(A, N) __builtin_ia32_vprotdi (A,1)
+#define __builtin_ia32_vprotqi(A, N) __builtin_ia32_vprotqi (A,1)
+
+/* lwpintrin.h */
+#define __builtin_ia32_lwpval32(D2, D1, F) __builtin_ia32_lwpval32 (D2, D1, 1)
+#define __builtin_ia32_lwpval64(D2, D1, F) __builtin_ia32_lwpval64 (D2, D1, 1)
+#define __builtin_ia32_lwpins32(D2, D1, F) __builtin_ia32_lwpins32 (D2, D1, 1)
+#define __builtin_ia32_lwpins64(D2, D1, F) __builtin_ia32_lwpins64 (D2, D1, 1)
#include <x86intrin.h>