OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [sse-14.c] - Blame information for rev 328

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -m3dnow -mavx -mxop -msse4a -maes -mpclmul -mpopcnt -mabm -mlwp" } */
3
 
4
#include <mm_malloc.h>
5
 
6
/* Test that the intrinsics compile without optimization.  All of them are
7
   defined as inline functions in {,x,e,p,t,s,w,a}mmintrin.h, xopintrin.h,
8
   lwpintrin.h and mm3dnow.h that reference the proper builtin functions.
9
   Defining away "extern" and "__inline" results in all of them being compiled
10
   as proper functions.  */
11
 
12
#define extern
13
#define __inline
14
 
15
#include <x86intrin.h>
16
 
17
#define _CONCAT(x,y) x ## y
18
 
19
#define test_1(func, type, op1_type, imm)                               \
20
  type _CONCAT(_,func) (op1_type A, int const I)                        \
21
  { return func (A, imm); }
22
 
23
#define test_1x(func, type, op1_type, imm1, imm2)                       \
24
  type _CONCAT(_,func) (op1_type A, int const I, int const L)           \
25
  { return func (A, imm1, imm2); }
26
 
27
#define test_2(func, type, op1_type, op2_type, imm)                     \
28
  type _CONCAT(_,func) (op1_type A, op2_type B, int const I)            \
29
  { return func (A, B, imm); }
30
 
31
#define test_2x(func, type, op1_type, op2_type, imm1, imm2)             \
32
  type _CONCAT(_,func) (op1_type A, op2_type B, int const I, int const L) \
33
  { return func (A, B, imm1, imm2); }
34
 
35
#define test_3(func, type, op1_type, op2_type, op3_type, imm)           \
36
  type _CONCAT(_,func) (op1_type A, op2_type B,                         \
37
                        op3_type C, int const I)                        \
38
  { return func (A, B, C, imm); }
39
 
40
#define test_4(func, type, op1_type, op2_type, op3_type, op4_type, imm) \
41
  type _CONCAT(_,func) (op1_type A, op2_type B,                         \
42
                        op3_type C, op4_type D, int const I)            \
43
  { return func (A, B, C, D, imm); }
44
 
45
 
46
/* Following intrinsics require immediate arguments.  They
47
   are defined as macros for non-optimized compilations. */
48
 
49
/* ammintrin.h */
50
test_1x (_mm_extracti_si64, __m128i, __m128i, 1, 1)
51
test_2x (_mm_inserti_si64, __m128i, __m128i, __m128i, 1, 1)
52
 
53
/* immintrin.h */
54
test_2 (_mm256_blend_pd, __m256d, __m256d, __m256d, 1)
55
test_2 (_mm256_blend_ps, __m256, __m256, __m256, 1)
56
test_2 (_mm256_dp_ps, __m256, __m256, __m256, 1)
57
test_2 (_mm256_shuffle_pd, __m256d, __m256d, __m256d, 1)
58
test_2 (_mm256_shuffle_ps, __m256, __m256, __m256, 1)
59
test_2 (_mm_cmp_sd, __m128d, __m128d, __m128d, 1)
60
test_2 (_mm_cmp_ss, __m128, __m128, __m128, 1)
61
test_2 (_mm_cmp_pd, __m128d, __m128d, __m128d, 1)
62
test_2 (_mm_cmp_ps, __m128, __m128, __m128, 1)
63
test_2 (_mm256_cmp_pd, __m256d, __m256d, __m256d, 1)
64
test_2 (_mm256_cmp_ps, __m256, __m256, __m256, 1)
65
test_1 (_mm256_extractf128_pd, __m128d, __m256d, 1)
66
test_1 (_mm256_extractf128_ps, __m128, __m256, 1)
67
test_1 (_mm256_extractf128_si256, __m128i, __m256i, 1)
68
test_1 (_mm256_extract_epi8, int, __m256i, 20)
69
test_1 (_mm256_extract_epi16, int, __m256i, 13)
70
test_1 (_mm256_extract_epi32, int, __m256i, 6)
71
#ifdef __x86_64__
72
test_1 (_mm256_extract_epi64, long long, __m256i, 2)
73
#endif
74
test_1 (_mm_permute_pd, __m128d, __m128d, 1)
75
test_1 (_mm256_permute_pd, __m256d, __m256d, 1)
76
test_1 (_mm_permute_ps, __m128, __m128, 1)
77
test_1 (_mm256_permute_ps, __m256, __m256, 1)
78
test_2 (_mm256_permute2f128_pd, __m256d, __m256d, __m256d, 1)
79
test_2 (_mm256_permute2f128_ps, __m256, __m256, __m256, 1)
80
test_2 (_mm256_permute2f128_si256, __m256i, __m256i, __m256i, 1)
81
test_2 (_mm256_insertf128_pd, __m256d, __m256d, __m128d, 1)
82
test_2 (_mm256_insertf128_ps, __m256, __m256, __m128, 1)
83
test_2 (_mm256_insertf128_si256, __m256i, __m256i, __m128i, 1)
84
test_2 (_mm256_insert_epi8, __m256i, __m256i, int, 30)
85
test_2 (_mm256_insert_epi16, __m256i, __m256i, int, 7)
86
test_2 (_mm256_insert_epi32, __m256i, __m256i, int, 3)
87
#ifdef __x86_64__
88
test_2 (_mm256_insert_epi64, __m256i, __m256i, long long, 1)
89
#endif
90
test_1 (_mm256_round_pd, __m256d, __m256d, 1)
91
test_1 (_mm256_round_ps, __m256, __m256, 1)
92
 
93
/* wmmintrin.h */
94
test_1 (_mm_aeskeygenassist_si128, __m128i, __m128i, 1)
95
test_2 (_mm_clmulepi64_si128, __m128i, __m128i, __m128i, 1)
96
 
97
/* smmintrin.h */
98
test_1 (_mm_round_pd, __m128d, __m128d, 1)
99
test_1 (_mm_round_ps, __m128, __m128, 1)
100
test_2 (_mm_round_sd, __m128d, __m128d, __m128d, 1)
101
test_2 (_mm_round_ss, __m128, __m128, __m128, 1)
102
 
103
test_2 (_mm_blend_epi16, __m128i, __m128i, __m128i, 1)
104
test_2 (_mm_blend_ps, __m128, __m128, __m128, 1)
105
test_2 (_mm_blend_pd, __m128d, __m128d, __m128d, 1)
106
test_2 (_mm_dp_ps, __m128, __m128, __m128, 1)
107
test_2 (_mm_dp_pd, __m128d, __m128d, __m128d, 1)
108
test_2 (_mm_insert_ps, __m128, __m128, __m128, 1)
109
test_1 (_mm_extract_ps, int, __m128, 1)
110
test_2 (_mm_insert_epi8, __m128i, __m128i, int, 1)
111
test_2 (_mm_insert_epi32, __m128i, __m128i, int, 1)
112
#ifdef __x86_64__
113
test_2 (_mm_insert_epi64, __m128i, __m128i, long long, 1)
114
#endif
115
test_1 (_mm_extract_epi8, int, __m128i, 1)
116
test_1 (_mm_extract_epi32, int, __m128i, 1)
117
#ifdef __x86_64__
118
test_1 (_mm_extract_epi64, long long, __m128i, 1)
119
#endif
120
test_2 (_mm_mpsadbw_epu8, __m128i, __m128i, __m128i, 1)
121
test_2 (_mm_cmpistrm, __m128i, __m128i, __m128i, 1)
122
test_2 (_mm_cmpistri, int, __m128i, __m128i, 1)
123
test_4 (_mm_cmpestrm, __m128i, __m128i, int, __m128i, int, 1)
124
test_4 (_mm_cmpestri, int, __m128i, int, __m128i, int, 1)
125
test_2 (_mm_cmpistra, int, __m128i, __m128i, 1)
126
test_2 (_mm_cmpistrc, int, __m128i, __m128i, 1)
127
test_2 (_mm_cmpistro, int, __m128i, __m128i, 1)
128
test_2 (_mm_cmpistrs, int, __m128i, __m128i, 1)
129
test_2 (_mm_cmpistrz, int, __m128i, __m128i, 1)
130
test_4 (_mm_cmpestra, int, __m128i, int, __m128i, int, 1)
131
test_4 (_mm_cmpestrc, int, __m128i, int, __m128i, int, 1)
132
test_4 (_mm_cmpestro, int, __m128i, int, __m128i, int, 1)
133
test_4 (_mm_cmpestrs, int, __m128i, int, __m128i, int, 1)
134
test_4 (_mm_cmpestrz, int, __m128i, int, __m128i, int, 1)
135
 
136
/* tmmintrin.h */
137
test_2 (_mm_alignr_epi8, __m128i, __m128i, __m128i, 1)
138
test_2 (_mm_alignr_pi8, __m64, __m64, __m64, 1)
139
 
140
/* emmintrin.h */
141
test_2 (_mm_shuffle_pd, __m128d, __m128d, __m128d, 1)
142
test_1 (_mm_srli_si128, __m128i, __m128i, 1)
143
test_1 (_mm_slli_si128, __m128i, __m128i, 1)
144
test_1 (_mm_extract_epi16, int, __m128i, 1)
145
test_2 (_mm_insert_epi16, __m128i, __m128i, int, 1)
146
test_1 (_mm_shufflehi_epi16, __m128i, __m128i, 1)
147
test_1 (_mm_shufflelo_epi16, __m128i, __m128i, 1)
148
test_1 (_mm_shuffle_epi32, __m128i, __m128i, 1)
149
 
150
/* xmmintrin.h */
151
test_2 (_mm_shuffle_ps, __m128, __m128, __m128, 1)
152
test_1 (_mm_extract_pi16, int, __m64, 1)
153
test_1 (_m_pextrw, int, __m64, 1)
154
test_2 (_mm_insert_pi16, __m64, __m64, int, 1)
155
test_2 (_m_pinsrw, __m64, __m64, int, 1)
156
test_1 (_mm_shuffle_pi16, __m64, __m64, 1)
157
test_1 (_m_pshufw, __m64, __m64, 1)
158
test_1 (_mm_prefetch, void, void *, _MM_HINT_NTA)
159
 
160
/* xopintrin.h */
161
test_1 ( _mm_roti_epi8, __m128i, __m128i, 1)
162
test_1 ( _mm_roti_epi16, __m128i, __m128i, 1)
163
test_1 ( _mm_roti_epi32, __m128i, __m128i, 1)
164
test_1 ( _mm_roti_epi64, __m128i, __m128i, 1)
165
test_3 (_mm_permute2_pd, __m128d, __m128d, __m128d, __m128d, 1)
166
test_3 (_mm256_permute2_pd, __m256d, __m256d, __m256d, __m256d, 1)
167
test_3 (_mm_permute2_ps, __m128, __m128, __m128, __m128, 1)
168
test_3 (_mm256_permute2_ps, __m256, __m256, __m256, __m256, 1)
169
 
170
/* lwpintrin.h */
171
test_2 ( __lwpval32, void, unsigned int, unsigned int, 1)
172
test_2 ( __lwpins32, unsigned char, unsigned int, unsigned int, 1)
173
#ifdef __x86_64__
174
test_2 ( __lwpval64, void, unsigned long long, unsigned int, 1)
175
test_2 ( __lwpins64, unsigned char, unsigned long long, unsigned int, 1)
176
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.