| 1 |
// RUN: %clang_cc1 -DUSE_64 -triple x86_64-unknown-unknown -target-feature +fxsr -target-feature +avx -target-feature +xsaveopt -target-feature +xsaves -target-feature +xsavec -target-feature +mwaitx -target-feature +clzero -target-feature +shstk -target-feature +wbnoinvd -target-feature +cldemote -Wno-implicit-function-declaration -emit-llvm -o %t %s |
| 2 |
// RUN: %clang_cc1 -DUSE_ALL -triple x86_64-unknown-unknown -target-feature +fxsr -target-feature +avx -target-feature +xsaveopt -target-feature +xsaves -target-feature +xsavec -target-feature +mwaitx -target-feature +shstk -target-feature +clzero -target-feature +wbnoinvd -target-feature +cldemote -Wno-implicit-function-declaration -fsyntax-only -o %t %s |
| 3 |
// RUN: %clang_cc1 -DUSE_64 -DOPENCL -x cl -cl-std=CL2.0 -triple x86_64-unknown-unknown -target-feature +fxsr -target-feature +avx -target-feature +xsaveopt -target-feature +xsaves -target-feature +xsavec -target-feature +mwaitx -target-feature +clzero -target-feature +shstk -target-feature +wbnoinvd -target-feature +cldemote -emit-llvm -o %t %s |
| 4 |
|
| 5 |
#ifdef USE_ALL |
| 6 |
#define USE_64 |
| 7 |
#define USE_SSE4 |
| 8 |
#endif |
| 9 |
|
| 10 |
// 64-bit |
| 11 |
typedef char V8c __attribute__((vector_size(8 * sizeof(char)))); |
| 12 |
typedef signed short V4s __attribute__((vector_size(8))); |
| 13 |
typedef signed int V2i __attribute__((vector_size(8))); |
| 14 |
#ifndef OPENCL |
| 15 |
typedef signed long long V1LLi __attribute__((vector_size(8))); |
| 16 |
#else |
| 17 |
typedef signed long V1LLi __attribute__((vector_size(8))); |
| 18 |
#endif |
| 19 |
|
| 20 |
typedef float V2f __attribute__((vector_size(8))); |
| 21 |
|
| 22 |
// 128-bit |
| 23 |
typedef char V16c __attribute__((vector_size(16))); |
| 24 |
typedef signed short V8s __attribute__((vector_size(16))); |
| 25 |
typedef unsigned short V8u __attribute__((vector_size(16))); |
| 26 |
typedef signed int V4i __attribute__((vector_size(16))); |
| 27 |
#ifndef OPENCL |
| 28 |
typedef signed long long V2LLi __attribute__((vector_size(16))); |
| 29 |
#else |
| 30 |
typedef signed long V2LLi __attribute__((vector_size(16))); |
| 31 |
#endif |
| 32 |
|
| 33 |
typedef float V4f __attribute__((vector_size(16))); |
| 34 |
typedef double V2d __attribute__((vector_size(16))); |
| 35 |
|
| 36 |
// 256-bit |
| 37 |
typedef char V32c __attribute__((vector_size(32))); |
| 38 |
typedef signed int V8i __attribute__((vector_size(32))); |
| 39 |
#ifndef OPENCL |
| 40 |
typedef signed long long V4LLi __attribute__((vector_size(32))); |
| 41 |
#else |
| 42 |
typedef signed long V4LLi __attribute__((vector_size(32))); |
| 43 |
#endif |
| 44 |
|
| 45 |
typedef double V4d __attribute__((vector_size(32))); |
| 46 |
typedef float V8f __attribute__((vector_size(32))); |
| 47 |
|
| 48 |
void f0(void) { |
| 49 |
signed char tmp_c; |
| 50 |
// unsigned char tmp_Uc; |
| 51 |
signed short tmp_s; |
| 52 |
#ifdef USE_ALL |
| 53 |
unsigned short tmp_Us; |
| 54 |
#endif |
| 55 |
signed int tmp_i; |
| 56 |
unsigned int tmp_Ui; |
| 57 |
#ifndef OPENCL |
| 58 |
signed long long tmp_LLi; |
| 59 |
unsigned long long tmp_ULLi; |
| 60 |
#else |
| 61 |
signed long tmp_LLi; |
| 62 |
unsigned long tmp_ULLi; |
| 63 |
#endif |
| 64 |
float tmp_f; |
| 65 |
double tmp_d; |
| 66 |
|
| 67 |
void* tmp_vp; |
| 68 |
const void* tmp_vCp; |
| 69 |
char* tmp_cp; |
| 70 |
const char* tmp_cCp; |
| 71 |
int* tmp_ip; |
| 72 |
float* tmp_fp; |
| 73 |
const float* tmp_fCp; |
| 74 |
double* tmp_dp; |
| 75 |
const double* tmp_dCp; |
| 76 |
#ifndef OPENCL |
| 77 |
long long* tmp_LLip; |
| 78 |
#else |
| 79 |
long* tmp_LLip; |
| 80 |
#endif |
| 81 |
|
| 82 |
#define imm_i 32 |
| 83 |
#define imm_i_0_2 0 |
| 84 |
#define imm_i_0_4 3 |
| 85 |
#define imm_i_0_8 7 |
| 86 |
#define imm_i_0_16 15 |
| 87 |
// Check this. |
| 88 |
#define imm_i_0_256 0 |
| 89 |
|
| 90 |
V2i* tmp_V2ip; |
| 91 |
V1LLi* tmp_V1LLip; |
| 92 |
V2LLi* tmp_V2LLip; |
| 93 |
|
| 94 |
// 64-bit |
| 95 |
V8c tmp_V8c; |
| 96 |
V4s tmp_V4s; |
| 97 |
V2i tmp_V2i; |
| 98 |
V1LLi tmp_V1LLi; |
| 99 |
|
| 100 |
// 128-bit |
| 101 |
V16c tmp_V16c; |
| 102 |
V8s tmp_V8s; |
| 103 |
V8u tmp_V8u; |
| 104 |
V4i tmp_V4i; |
| 105 |
V2LLi tmp_V2LLi; |
| 106 |
V4f tmp_V4f; |
| 107 |
V2d tmp_V2d; |
| 108 |
V2d* tmp_V2dp; |
| 109 |
V4f* tmp_V4fp; |
| 110 |
const V2d* tmp_V2dCp; |
| 111 |
const V4f* tmp_V4fCp; |
| 112 |
|
| 113 |
// 256-bit |
| 114 |
V32c tmp_V32c; |
| 115 |
V4d tmp_V4d; |
| 116 |
V8f tmp_V8f; |
| 117 |
V4LLi tmp_V4LLi; |
| 118 |
V8i tmp_V8i; |
| 119 |
V4LLi* tmp_V4LLip; |
| 120 |
V4d* tmp_V4dp; |
| 121 |
V8f* tmp_V8fp; |
| 122 |
const V4d* tmp_V4dCp; |
| 123 |
const V8f* tmp_V8fCp; |
| 124 |
|
| 125 |
tmp_V2d = __builtin_ia32_undef128(); |
| 126 |
tmp_V4d = __builtin_ia32_undef256(); |
| 127 |
|
| 128 |
tmp_i = __builtin_ia32_comieq(tmp_V4f, tmp_V4f); |
| 129 |
tmp_i = __builtin_ia32_comilt(tmp_V4f, tmp_V4f); |
| 130 |
tmp_i = __builtin_ia32_comile(tmp_V4f, tmp_V4f); |
| 131 |
tmp_i = __builtin_ia32_comigt(tmp_V4f, tmp_V4f); |
| 132 |
tmp_i = __builtin_ia32_comige(tmp_V4f, tmp_V4f); |
| 133 |
tmp_i = __builtin_ia32_comineq(tmp_V4f, tmp_V4f); |
| 134 |
tmp_i = __builtin_ia32_ucomieq(tmp_V4f, tmp_V4f); |
| 135 |
tmp_i = __builtin_ia32_ucomilt(tmp_V4f, tmp_V4f); |
| 136 |
tmp_i = __builtin_ia32_ucomile(tmp_V4f, tmp_V4f); |
| 137 |
tmp_i = __builtin_ia32_ucomigt(tmp_V4f, tmp_V4f); |
| 138 |
tmp_i = __builtin_ia32_ucomige(tmp_V4f, tmp_V4f); |
| 139 |
tmp_i = __builtin_ia32_ucomineq(tmp_V4f, tmp_V4f); |
| 140 |
tmp_i = __builtin_ia32_comisdeq(tmp_V2d, tmp_V2d); |
| 141 |
tmp_i = __builtin_ia32_comisdlt(tmp_V2d, tmp_V2d); |
| 142 |
tmp_i = __builtin_ia32_comisdle(tmp_V2d, tmp_V2d); |
| 143 |
tmp_i = __builtin_ia32_comisdgt(tmp_V2d, tmp_V2d); |
| 144 |
tmp_i = __builtin_ia32_comisdge(tmp_V2d, tmp_V2d); |
| 145 |
tmp_i = __builtin_ia32_comisdneq(tmp_V2d, tmp_V2d); |
| 146 |
tmp_i = __builtin_ia32_ucomisdeq(tmp_V2d, tmp_V2d); |
| 147 |
tmp_i = __builtin_ia32_ucomisdlt(tmp_V2d, tmp_V2d); |
| 148 |
tmp_i = __builtin_ia32_ucomisdle(tmp_V2d, tmp_V2d); |
| 149 |
tmp_i = __builtin_ia32_ucomisdgt(tmp_V2d, tmp_V2d); |
| 150 |
tmp_i = __builtin_ia32_ucomisdge(tmp_V2d, tmp_V2d); |
| 151 |
tmp_i = __builtin_ia32_ucomisdneq(tmp_V2d, tmp_V2d); |
| 152 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 0); |
| 153 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 1); |
| 154 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 2); |
| 155 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 3); |
| 156 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 4); |
| 157 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 5); |
| 158 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 6); |
| 159 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 7); |
| 160 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 0); |
| 161 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 1); |
| 162 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 2); |
| 163 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 3); |
| 164 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 4); |
| 165 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 5); |
| 166 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 6); |
| 167 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 7); |
| 168 |
tmp_V4f = __builtin_ia32_minps(tmp_V4f, tmp_V4f); |
| 169 |
tmp_V4f = __builtin_ia32_maxps(tmp_V4f, tmp_V4f); |
| 170 |
tmp_V4f = __builtin_ia32_minss(tmp_V4f, tmp_V4f); |
| 171 |
tmp_V4f = __builtin_ia32_maxss(tmp_V4f, tmp_V4f); |
| 172 |
|
| 173 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 0); |
| 174 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 1); |
| 175 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 2); |
| 176 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 3); |
| 177 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 4); |
| 178 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 5); |
| 179 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 6); |
| 180 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 7); |
| 181 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 0); |
| 182 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 1); |
| 183 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 2); |
| 184 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 3); |
| 185 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 4); |
| 186 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 5); |
| 187 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 6); |
| 188 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 7); |
| 189 |
tmp_V2d = __builtin_ia32_minpd(tmp_V2d, tmp_V2d); |
| 190 |
tmp_V2d = __builtin_ia32_maxpd(tmp_V2d, tmp_V2d); |
| 191 |
tmp_V2d = __builtin_ia32_minsd(tmp_V2d, tmp_V2d); |
| 192 |
tmp_V2d = __builtin_ia32_maxsd(tmp_V2d, tmp_V2d); |
| 193 |
tmp_V8s = __builtin_ia32_pmulhw128(tmp_V8s, tmp_V8s); |
| 194 |
tmp_V16c = __builtin_ia32_packsswb128(tmp_V8s, tmp_V8s); |
| 195 |
tmp_V8s = __builtin_ia32_packssdw128(tmp_V4i, tmp_V4i); |
| 196 |
tmp_V16c = __builtin_ia32_packuswb128(tmp_V8s, tmp_V8s); |
| 197 |
tmp_V8u = __builtin_ia32_pmulhuw128(tmp_V8u, tmp_V8u); |
| 198 |
tmp_V4f = __builtin_ia32_addsubps(tmp_V4f, tmp_V4f); |
| 199 |
tmp_V2d = __builtin_ia32_addsubpd(tmp_V2d, tmp_V2d); |
| 200 |
tmp_V4f = __builtin_ia32_haddps(tmp_V4f, tmp_V4f); |
| 201 |
tmp_V2d = __builtin_ia32_haddpd(tmp_V2d, tmp_V2d); |
| 202 |
tmp_V4f = __builtin_ia32_hsubps(tmp_V4f, tmp_V4f); |
| 203 |
tmp_V2d = __builtin_ia32_hsubpd(tmp_V2d, tmp_V2d); |
| 204 |
tmp_V8s = __builtin_ia32_phaddw128(tmp_V8s, tmp_V8s); |
| 205 |
tmp_V4i = __builtin_ia32_phaddd128(tmp_V4i, tmp_V4i); |
| 206 |
tmp_V8s = __builtin_ia32_phaddsw128(tmp_V8s, tmp_V8s); |
| 207 |
tmp_V8s = __builtin_ia32_phsubw128(tmp_V8s, tmp_V8s); |
| 208 |
tmp_V4i = __builtin_ia32_phsubd128(tmp_V4i, tmp_V4i); |
| 209 |
tmp_V8s = __builtin_ia32_phsubsw128(tmp_V8s, tmp_V8s); |
| 210 |
tmp_V8s = __builtin_ia32_pmaddubsw128(tmp_V16c, tmp_V16c); |
| 211 |
tmp_V8s = __builtin_ia32_pmulhrsw128(tmp_V8s, tmp_V8s); |
| 212 |
tmp_V16c = __builtin_ia32_pshufb128(tmp_V16c, tmp_V16c); |
| 213 |
tmp_V16c = __builtin_ia32_psignb128(tmp_V16c, tmp_V16c); |
| 214 |
tmp_V8s = __builtin_ia32_psignw128(tmp_V8s, tmp_V8s); |
| 215 |
tmp_V4i = __builtin_ia32_psignd128(tmp_V4i, tmp_V4i); |
| 216 |
|
| 217 |
__builtin_ia32_incsspd(tmp_Ui); |
| 218 |
__builtin_ia32_incsspq(tmp_ULLi); |
| 219 |
tmp_Ui = __builtin_ia32_rdsspd(tmp_Ui); |
| 220 |
tmp_ULLi = __builtin_ia32_rdsspq(tmp_ULLi); |
| 221 |
__builtin_ia32_saveprevssp(); |
| 222 |
__builtin_ia32_rstorssp(tmp_vp); |
| 223 |
__builtin_ia32_wrssd(tmp_Ui, tmp_vp); |
| 224 |
__builtin_ia32_wrssq(tmp_ULLi, tmp_vp); |
| 225 |
__builtin_ia32_wrussd(tmp_Ui, tmp_vp); |
| 226 |
__builtin_ia32_wrussq(tmp_ULLi, tmp_vp); |
| 227 |
__builtin_ia32_setssbsy(); |
| 228 |
__builtin_ia32_clrssbsy(tmp_vp); |
| 229 |
|
| 230 |
(void) __builtin_ia32_ldmxcsr(tmp_Ui); |
| 231 |
#ifndef OPENCL |
| 232 |
(void) _mm_setcsr(tmp_Ui); |
| 233 |
#endif |
| 234 |
tmp_Ui = __builtin_ia32_stmxcsr(); |
| 235 |
#ifndef OPENCL |
| 236 |
tmp_Ui = _mm_getcsr(); |
| 237 |
#endif |
| 238 |
(void)__builtin_ia32_fxsave(tmp_vp); |
| 239 |
(void)__builtin_ia32_fxsave64(tmp_vp); |
| 240 |
(void)__builtin_ia32_fxrstor(tmp_vp); |
| 241 |
(void)__builtin_ia32_fxrstor64(tmp_vp); |
| 242 |
|
| 243 |
(void)__builtin_ia32_xsave(tmp_vp, tmp_ULLi); |
| 244 |
(void)__builtin_ia32_xsave64(tmp_vp, tmp_ULLi); |
| 245 |
tmp_ULLi = __builtin_ia32_xgetbv(tmp_Ui); |
| 246 |
(void)__builtin_ia32_xsetbv(tmp_Ui, tmp_ULLi); |
| 247 |
(void)__builtin_ia32_xrstor(tmp_vp, tmp_ULLi); |
| 248 |
(void)__builtin_ia32_xrstor64(tmp_vp, tmp_ULLi); |
| 249 |
(void)__builtin_ia32_xsaveopt(tmp_vp, tmp_ULLi); |
| 250 |
(void)__builtin_ia32_xsaveopt64(tmp_vp, tmp_ULLi); |
| 251 |
(void)__builtin_ia32_xrstors(tmp_vp, tmp_ULLi); |
| 252 |
(void)__builtin_ia32_xrstors64(tmp_vp, tmp_ULLi); |
| 253 |
(void)__builtin_ia32_xsavec(tmp_vp, tmp_ULLi); |
| 254 |
(void)__builtin_ia32_xsavec64(tmp_vp, tmp_ULLi); |
| 255 |
(void)__builtin_ia32_xsaves(tmp_vp, tmp_ULLi); |
| 256 |
(void)__builtin_ia32_xsaves64(tmp_vp, tmp_ULLi); |
| 257 |
|
| 258 |
(void) __builtin_ia32_monitorx(tmp_vp, tmp_Ui, tmp_Ui); |
| 259 |
(void) __builtin_ia32_mwaitx(tmp_Ui, tmp_Ui, tmp_Ui); |
| 260 |
(void) __builtin_ia32_clzero(tmp_vp); |
| 261 |
(void) __builtin_ia32_cldemote(tmp_vp); |
| 262 |
|
| 263 |
tmp_i = __builtin_ia32_cvtss2si(tmp_V4f); |
| 264 |
tmp_i = __builtin_ia32_cvttss2si(tmp_V4f); |
| 265 |
|
| 266 |
tmp_i = __builtin_ia32_rdtsc(); |
| 267 |
tmp_i = __rdtsc(); |
| 268 |
tmp_i = __builtin_ia32_rdtscp(&tmp_Ui); |
| 269 |
tmp_LLi = __builtin_ia32_rdpmc(tmp_i); |
| 270 |
__builtin_ia32_wbnoinvd(); |
| 271 |
#ifdef USE_64 |
| 272 |
tmp_LLi = __builtin_ia32_cvtss2si64(tmp_V4f); |
| 273 |
tmp_LLi = __builtin_ia32_cvttss2si64(tmp_V4f); |
| 274 |
#endif |
| 275 |
tmp_i = __builtin_ia32_movmskps(tmp_V4f); |
| 276 |
(void) __builtin_ia32_sfence(); |
| 277 |
#ifndef OPENCL |
| 278 |
(void) _mm_sfence(); |
| 279 |
#endif |
| 280 |
|
| 281 |
tmp_V4f = __builtin_ia32_rcpps(tmp_V4f); |
| 282 |
tmp_V4f = __builtin_ia32_rcpss(tmp_V4f); |
| 283 |
tmp_V4f = __builtin_ia32_rsqrtps(tmp_V4f); |
| 284 |
tmp_V4f = __builtin_ia32_rsqrtss(tmp_V4f); |
| 285 |
(void) __builtin_ia32_maskmovdqu(tmp_V16c, tmp_V16c, tmp_cp); |
| 286 |
tmp_i = __builtin_ia32_movmskpd(tmp_V2d); |
| 287 |
tmp_i = __builtin_ia32_pmovmskb128(tmp_V16c); |
| 288 |
(void) __builtin_ia32_movnti(tmp_ip, tmp_i); |
| 289 |
#ifdef USE_64 |
| 290 |
(void) __builtin_ia32_movnti64(tmp_LLip, tmp_LLi); |
| 291 |
#endif |
| 292 |
tmp_V2LLi = __builtin_ia32_psadbw128(tmp_V16c, tmp_V16c); |
| 293 |
tmp_V2LLi = __builtin_ia32_cvtpd2dq(tmp_V2d); |
| 294 |
tmp_V4f = __builtin_ia32_cvtpd2ps(tmp_V2d); |
| 295 |
tmp_V4i = __builtin_ia32_cvttpd2dq(tmp_V2d); |
| 296 |
tmp_i = __builtin_ia32_cvtsd2si(tmp_V2d); |
| 297 |
tmp_i = __builtin_ia32_cvttsd2si(tmp_V2d); |
| 298 |
tmp_V4f = __builtin_ia32_cvtsd2ss(tmp_V4f, tmp_V2d); |
| 299 |
#ifdef USE_64 |
| 300 |
tmp_LLi = __builtin_ia32_cvtsd2si64(tmp_V2d); |
| 301 |
tmp_LLi = __builtin_ia32_cvttsd2si64(tmp_V2d); |
| 302 |
#endif |
| 303 |
tmp_V4i = __builtin_ia32_cvtps2dq(tmp_V4f); |
| 304 |
tmp_V4i = __builtin_ia32_cvttps2dq(tmp_V4f); |
| 305 |
(void) __builtin_ia32_clflush(tmp_vCp); |
| 306 |
#ifndef OPENCL |
| 307 |
(void) _mm_clflush(tmp_vCp); |
| 308 |
#endif |
| 309 |
(void) __builtin_ia32_lfence(); |
| 310 |
#ifndef OPENCL |
| 311 |
(void) _mm_lfence(); |
| 312 |
#endif |
| 313 |
(void) __builtin_ia32_mfence(); |
| 314 |
#ifndef OPENCL |
| 315 |
(void) _mm_mfence(); |
| 316 |
#endif |
| 317 |
(void) __builtin_ia32_pause(); |
| 318 |
#ifndef OPENCL |
| 319 |
(void) _mm_pause(); |
| 320 |
#endif |
| 321 |
|
| 322 |
|
| 323 |
// Using non-immediate argument supported for gcc compatibility |
| 324 |
|
| 325 |
tmp_V2LLi = __builtin_ia32_pmuludq128(tmp_V4i, tmp_V4i); |
| 326 |
tmp_V8s = __builtin_ia32_psraw128(tmp_V8s, tmp_V8s); |
| 327 |
tmp_V4i = __builtin_ia32_psrad128(tmp_V4i, tmp_V4i); |
| 328 |
tmp_V8s = __builtin_ia32_psrlw128(tmp_V8s, tmp_V8s); |
| 329 |
tmp_V4i = __builtin_ia32_psrld128(tmp_V4i, tmp_V4i); |
| 330 |
tmp_V2LLi = __builtin_ia32_psrlq128(tmp_V2LLi, tmp_V2LLi); |
| 331 |
tmp_V8s = __builtin_ia32_psllw128(tmp_V8s, tmp_V8s); |
| 332 |
tmp_V4i = __builtin_ia32_pslld128(tmp_V4i, tmp_V4i); |
| 333 |
tmp_V2LLi = __builtin_ia32_psllq128(tmp_V2LLi, tmp_V2LLi); |
| 334 |
|
| 335 |
tmp_V8s = __builtin_ia32_psllwi128(tmp_V8s, imm_i_0_8); |
| 336 |
tmp_V4i = __builtin_ia32_pslldi128(tmp_V4i, imm_i_0_8); |
| 337 |
tmp_V2LLi = __builtin_ia32_psllqi128(tmp_V2LLi, imm_i_0_8); |
| 338 |
tmp_V8s = __builtin_ia32_psrlwi128(tmp_V8s, imm_i_0_8); |
| 339 |
tmp_V4i = __builtin_ia32_psrldi128(tmp_V4i, imm_i_0_8); |
| 340 |
tmp_V2LLi = __builtin_ia32_psrlqi128(tmp_V2LLi, imm_i_0_8); |
| 341 |
tmp_V8s = __builtin_ia32_psrawi128(tmp_V8s, imm_i_0_8); |
| 342 |
tmp_V4i = __builtin_ia32_psradi128(tmp_V4i, imm_i_0_8); |
| 343 |
|
| 344 |
// Using non-immediate argument supported for gcc compatibility |
| 345 |
tmp_V8s = __builtin_ia32_psllwi128(tmp_V8s, tmp_i); |
| 346 |
tmp_V4i = __builtin_ia32_pslldi128(tmp_V4i, tmp_i); |
| 347 |
tmp_V2LLi = __builtin_ia32_psllqi128(tmp_V2LLi, tmp_i); |
| 348 |
tmp_V8s = __builtin_ia32_psrlwi128(tmp_V8s, tmp_i); |
| 349 |
tmp_V4i = __builtin_ia32_psrldi128(tmp_V4i, tmp_i); |
| 350 |
tmp_V2LLi = __builtin_ia32_psrlqi128(tmp_V2LLi, tmp_i); |
| 351 |
tmp_V8s = __builtin_ia32_psrawi128(tmp_V8s, tmp_i); |
| 352 |
tmp_V4i = __builtin_ia32_psradi128(tmp_V4i, tmp_i); |
| 353 |
|
| 354 |
tmp_V4i = __builtin_ia32_pmaddwd128(tmp_V8s, tmp_V8s); |
| 355 |
(void) __builtin_ia32_monitor(tmp_vp, tmp_Ui, tmp_Ui); |
| 356 |
(void) __builtin_ia32_mwait(tmp_Ui, tmp_Ui); |
| 357 |
tmp_V16c = __builtin_ia32_lddqu(tmp_cCp); |
| 358 |
tmp_V16c = __builtin_ia32_palignr128(tmp_V16c, tmp_V16c, imm_i); |
| 359 |
#ifdef USE_SSE4 |
| 360 |
tmp_V16c = __builtin_ia32_pblendvb128(tmp_V16c, tmp_V16c, tmp_V16c); |
| 361 |
tmp_V2d = __builtin_ia32_blendvpd(tmp_V2d, tmp_V2d, tmp_V2d); |
| 362 |
tmp_V4f = __builtin_ia32_blendvps(tmp_V4f, tmp_V4f, tmp_V4f); |
| 363 |
tmp_V8s = __builtin_ia32_packusdw128(tmp_V4i, tmp_V4i); |
| 364 |
tmp_V2LLi = __builtin_ia32_pmuldq128(tmp_V4i, tmp_V4i); |
| 365 |
tmp_V4f = __builtin_ia32_roundps(tmp_V4f, imm_i_0_16); |
| 366 |
tmp_V4f = __builtin_ia32_roundss(tmp_V4f, tmp_V4f, imm_i_0_16); |
| 367 |
tmp_V2d = __builtin_ia32_roundsd(tmp_V2d, tmp_V2d, imm_i_0_16); |
| 368 |
tmp_V2d = __builtin_ia32_roundpd(tmp_V2d, imm_i_0_16); |
| 369 |
tmp_V4f = __builtin_ia32_insertps128(tmp_V4f, tmp_V4f, imm_i_0_256); |
| 370 |
#endif |
| 371 |
|
| 372 |
tmp_V4d = __builtin_ia32_addsubpd256(tmp_V4d, tmp_V4d); |
| 373 |
tmp_V8f = __builtin_ia32_addsubps256(tmp_V8f, tmp_V8f); |
| 374 |
tmp_V4d = __builtin_ia32_haddpd256(tmp_V4d, tmp_V4d); |
| 375 |
tmp_V8f = __builtin_ia32_hsubps256(tmp_V8f, tmp_V8f); |
| 376 |
tmp_V4d = __builtin_ia32_hsubpd256(tmp_V4d, tmp_V4d); |
| 377 |
tmp_V8f = __builtin_ia32_haddps256(tmp_V8f, tmp_V8f); |
| 378 |
tmp_V4d = __builtin_ia32_maxpd256(tmp_V4d, tmp_V4d); |
| 379 |
tmp_V8f = __builtin_ia32_maxps256(tmp_V8f, tmp_V8f); |
| 380 |
tmp_V4d = __builtin_ia32_minpd256(tmp_V4d, tmp_V4d); |
| 381 |
tmp_V8f = __builtin_ia32_minps256(tmp_V8f, tmp_V8f); |
| 382 |
tmp_V2d = __builtin_ia32_vpermilvarpd(tmp_V2d, tmp_V2LLi); |
| 383 |
tmp_V4f = __builtin_ia32_vpermilvarps(tmp_V4f, tmp_V4i); |
| 384 |
tmp_V4d = __builtin_ia32_vpermilvarpd256(tmp_V4d, tmp_V4LLi); |
| 385 |
tmp_V8f = __builtin_ia32_vpermilvarps256(tmp_V8f, tmp_V8i); |
| 386 |
tmp_V4d = __builtin_ia32_blendvpd256(tmp_V4d, tmp_V4d, tmp_V4d); |
| 387 |
tmp_V8f = __builtin_ia32_blendvps256(tmp_V8f, tmp_V8f, tmp_V8f); |
| 388 |
tmp_V8f = __builtin_ia32_dpps256(tmp_V8f, tmp_V8f, 0x7); |
| 389 |
tmp_V4d = __builtin_ia32_cmppd256(tmp_V4d, tmp_V4d, 0); |
| 390 |
tmp_V8f = __builtin_ia32_cmpps256(tmp_V8f, tmp_V8f, 0); |
| 391 |
tmp_V4f = __builtin_ia32_cvtpd2ps256(tmp_V4d); |
| 392 |
tmp_V8i = __builtin_ia32_cvtps2dq256(tmp_V8f); |
| 393 |
tmp_V4i = __builtin_ia32_cvttpd2dq256(tmp_V4d); |
| 394 |
tmp_V4i = __builtin_ia32_cvtpd2dq256(tmp_V4d); |
| 395 |
tmp_V8i = __builtin_ia32_cvttps2dq256(tmp_V8f); |
| 396 |
tmp_V4d = __builtin_ia32_vperm2f128_pd256(tmp_V4d, tmp_V4d, 0x7); |
| 397 |
tmp_V8f = __builtin_ia32_vperm2f128_ps256(tmp_V8f, tmp_V8f, 0x7); |
| 398 |
tmp_V8i = __builtin_ia32_vperm2f128_si256(tmp_V8i, tmp_V8i, 0x7); |
| 399 |
tmp_V8f = __builtin_ia32_rsqrtps256(tmp_V8f); |
| 400 |
tmp_V8f = __builtin_ia32_rcpps256(tmp_V8f); |
| 401 |
tmp_V4d = __builtin_ia32_roundpd256(tmp_V4d, 0x1); |
| 402 |
tmp_V8f = __builtin_ia32_roundps256(tmp_V8f, 0x1); |
| 403 |
tmp_i = __builtin_ia32_vtestzpd(tmp_V2d, tmp_V2d); |
| 404 |
tmp_i = __builtin_ia32_vtestcpd(tmp_V2d, tmp_V2d); |
| 405 |
tmp_i = __builtin_ia32_vtestnzcpd(tmp_V2d, tmp_V2d); |
| 406 |
tmp_i = __builtin_ia32_vtestzps(tmp_V4f, tmp_V4f); |
| 407 |
tmp_i = __builtin_ia32_vtestcps(tmp_V4f, tmp_V4f); |
| 408 |
tmp_i = __builtin_ia32_vtestnzcps(tmp_V4f, tmp_V4f); |
| 409 |
tmp_i = __builtin_ia32_vtestzpd256(tmp_V4d, tmp_V4d); |
| 410 |
tmp_i = __builtin_ia32_vtestcpd256(tmp_V4d, tmp_V4d); |
| 411 |
tmp_i = __builtin_ia32_vtestnzcpd256(tmp_V4d, tmp_V4d); |
| 412 |
tmp_i = __builtin_ia32_vtestzps256(tmp_V8f, tmp_V8f); |
| 413 |
tmp_i = __builtin_ia32_vtestcps256(tmp_V8f, tmp_V8f); |
| 414 |
tmp_i = __builtin_ia32_vtestnzcps256(tmp_V8f, tmp_V8f); |
| 415 |
tmp_i = __builtin_ia32_ptestz256(tmp_V4LLi, tmp_V4LLi); |
| 416 |
tmp_i = __builtin_ia32_ptestc256(tmp_V4LLi, tmp_V4LLi); |
| 417 |
tmp_i = __builtin_ia32_ptestnzc256(tmp_V4LLi, tmp_V4LLi); |
| 418 |
tmp_i = __builtin_ia32_movmskpd256(tmp_V4d); |
| 419 |
tmp_i = __builtin_ia32_movmskps256(tmp_V8f); |
| 420 |
__builtin_ia32_vzeroall(); |
| 421 |
__builtin_ia32_vzeroupper(); |
| 422 |
tmp_V32c = __builtin_ia32_lddqu256(tmp_cCp); |
| 423 |
tmp_V2d = __builtin_ia32_maskloadpd(tmp_V2dCp, tmp_V2LLi); |
| 424 |
tmp_V4f = __builtin_ia32_maskloadps(tmp_V4fCp, tmp_V4i); |
| 425 |
tmp_V4d = __builtin_ia32_maskloadpd256(tmp_V4dCp, tmp_V4LLi); |
| 426 |
tmp_V8f = __builtin_ia32_maskloadps256(tmp_V8fCp, tmp_V8i); |
| 427 |
__builtin_ia32_maskstorepd(tmp_V2dp, tmp_V2LLi, tmp_V2d); |
| 428 |
__builtin_ia32_maskstoreps(tmp_V4fp, tmp_V4i, tmp_V4f); |
| 429 |
__builtin_ia32_maskstorepd256(tmp_V4dp, tmp_V4LLi, tmp_V4d); |
| 430 |
__builtin_ia32_maskstoreps256(tmp_V8fp, tmp_V8i, tmp_V8f); |
| 431 |
|
| 432 |
#if USE_ALL |
| 433 |
tmp_V4i = __builtin_ia32_sha1rnds4(tmp_V4i, tmp_V4i, imm_i_0_4); |
| 434 |
tmp_V4i = __builtin_ia32_sha1nexte(tmp_V4i, tmp_V4i); |
| 435 |
tmp_V4i = __builtin_ia32_sha1msg1(tmp_V4i, tmp_V4i); |
| 436 |
tmp_V4i = __builtin_ia32_sha1msg2(tmp_V4i, tmp_V4i); |
| 437 |
tmp_V4i = __builtin_ia32_sha256rnds2(tmp_V4i, tmp_V4i, tmp_V4i); |
| 438 |
tmp_V4i = __builtin_ia32_sha256msg1(tmp_V4i, tmp_V4i); |
| 439 |
tmp_V4i = __builtin_ia32_sha256msg2(tmp_V4i, tmp_V4i); |
| 440 |
#endif |
| 441 |
} |