| 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 signed int V4i __attribute__((vector_size(16))); |
| 26 |
#ifndef OPENCL |
| 27 |
typedef signed long long V2LLi __attribute__((vector_size(16))); |
| 28 |
#else |
| 29 |
typedef signed long V2LLi __attribute__((vector_size(16))); |
| 30 |
#endif |
| 31 |
|
| 32 |
typedef float V4f __attribute__((vector_size(16))); |
| 33 |
typedef double V2d __attribute__((vector_size(16))); |
| 34 |
|
| 35 |
// 256-bit |
| 36 |
typedef char V32c __attribute__((vector_size(32))); |
| 37 |
typedef signed int V8i __attribute__((vector_size(32))); |
| 38 |
#ifndef OPENCL |
| 39 |
typedef signed long long V4LLi __attribute__((vector_size(32))); |
| 40 |
#else |
| 41 |
typedef signed long V4LLi __attribute__((vector_size(32))); |
| 42 |
#endif |
| 43 |
|
| 44 |
typedef double V4d __attribute__((vector_size(32))); |
| 45 |
typedef float V8f __attribute__((vector_size(32))); |
| 46 |
|
| 47 |
void f0(void) { |
| 48 |
signed char tmp_c; |
| 49 |
// unsigned char tmp_Uc; |
| 50 |
signed short tmp_s; |
| 51 |
#ifdef USE_ALL |
| 52 |
unsigned short tmp_Us; |
| 53 |
#endif |
| 54 |
signed int tmp_i; |
| 55 |
unsigned int tmp_Ui; |
| 56 |
#ifndef OPENCL |
| 57 |
signed long long tmp_LLi; |
| 58 |
unsigned long long tmp_ULLi; |
| 59 |
#else |
| 60 |
signed long tmp_LLi; |
| 61 |
unsigned long tmp_ULLi; |
| 62 |
#endif |
| 63 |
float tmp_f; |
| 64 |
double tmp_d; |
| 65 |
|
| 66 |
void* tmp_vp; |
| 67 |
const void* tmp_vCp; |
| 68 |
char* tmp_cp; |
| 69 |
const char* tmp_cCp; |
| 70 |
int* tmp_ip; |
| 71 |
float* tmp_fp; |
| 72 |
const float* tmp_fCp; |
| 73 |
double* tmp_dp; |
| 74 |
const double* tmp_dCp; |
| 75 |
#ifndef OPENCL |
| 76 |
long long* tmp_LLip; |
| 77 |
#else |
| 78 |
long* tmp_LLip; |
| 79 |
#endif |
| 80 |
|
| 81 |
#define imm_i 32 |
| 82 |
#define imm_i_0_2 0 |
| 83 |
#define imm_i_0_4 3 |
| 84 |
#define imm_i_0_8 7 |
| 85 |
#define imm_i_0_16 15 |
| 86 |
// Check this. |
| 87 |
#define imm_i_0_256 0 |
| 88 |
|
| 89 |
V2i* tmp_V2ip; |
| 90 |
V1LLi* tmp_V1LLip; |
| 91 |
V2LLi* tmp_V2LLip; |
| 92 |
|
| 93 |
// 64-bit |
| 94 |
V8c tmp_V8c; |
| 95 |
V4s tmp_V4s; |
| 96 |
V2i tmp_V2i; |
| 97 |
V1LLi tmp_V1LLi; |
| 98 |
|
| 99 |
// 128-bit |
| 100 |
V16c tmp_V16c; |
| 101 |
V8s tmp_V8s; |
| 102 |
V4i tmp_V4i; |
| 103 |
V2LLi tmp_V2LLi; |
| 104 |
V4f tmp_V4f; |
| 105 |
V2d tmp_V2d; |
| 106 |
V2d* tmp_V2dp; |
| 107 |
V4f* tmp_V4fp; |
| 108 |
const V2d* tmp_V2dCp; |
| 109 |
const V4f* tmp_V4fCp; |
| 110 |
|
| 111 |
// 256-bit |
| 112 |
V32c tmp_V32c; |
| 113 |
V4d tmp_V4d; |
| 114 |
V8f tmp_V8f; |
| 115 |
V4LLi tmp_V4LLi; |
| 116 |
V8i tmp_V8i; |
| 117 |
V4LLi* tmp_V4LLip; |
| 118 |
V4d* tmp_V4dp; |
| 119 |
V8f* tmp_V8fp; |
| 120 |
const V4d* tmp_V4dCp; |
| 121 |
const V8f* tmp_V8fCp; |
| 122 |
|
| 123 |
tmp_V2d = __builtin_ia32_undef128(); |
| 124 |
tmp_V4d = __builtin_ia32_undef256(); |
| 125 |
|
| 126 |
tmp_i = __builtin_ia32_comieq(tmp_V4f, tmp_V4f); |
| 127 |
tmp_i = __builtin_ia32_comilt(tmp_V4f, tmp_V4f); |
| 128 |
tmp_i = __builtin_ia32_comile(tmp_V4f, tmp_V4f); |
| 129 |
tmp_i = __builtin_ia32_comigt(tmp_V4f, tmp_V4f); |
| 130 |
tmp_i = __builtin_ia32_comige(tmp_V4f, tmp_V4f); |
| 131 |
tmp_i = __builtin_ia32_comineq(tmp_V4f, tmp_V4f); |
| 132 |
tmp_i = __builtin_ia32_ucomieq(tmp_V4f, tmp_V4f); |
| 133 |
tmp_i = __builtin_ia32_ucomilt(tmp_V4f, tmp_V4f); |
| 134 |
tmp_i = __builtin_ia32_ucomile(tmp_V4f, tmp_V4f); |
| 135 |
tmp_i = __builtin_ia32_ucomigt(tmp_V4f, tmp_V4f); |
| 136 |
tmp_i = __builtin_ia32_ucomige(tmp_V4f, tmp_V4f); |
| 137 |
tmp_i = __builtin_ia32_ucomineq(tmp_V4f, tmp_V4f); |
| 138 |
tmp_i = __builtin_ia32_comisdeq(tmp_V2d, tmp_V2d); |
| 139 |
tmp_i = __builtin_ia32_comisdlt(tmp_V2d, tmp_V2d); |
| 140 |
tmp_i = __builtin_ia32_comisdle(tmp_V2d, tmp_V2d); |
| 141 |
tmp_i = __builtin_ia32_comisdgt(tmp_V2d, tmp_V2d); |
| 142 |
tmp_i = __builtin_ia32_comisdge(tmp_V2d, tmp_V2d); |
| 143 |
tmp_i = __builtin_ia32_comisdneq(tmp_V2d, tmp_V2d); |
| 144 |
tmp_i = __builtin_ia32_ucomisdeq(tmp_V2d, tmp_V2d); |
| 145 |
tmp_i = __builtin_ia32_ucomisdlt(tmp_V2d, tmp_V2d); |
| 146 |
tmp_i = __builtin_ia32_ucomisdle(tmp_V2d, tmp_V2d); |
| 147 |
tmp_i = __builtin_ia32_ucomisdgt(tmp_V2d, tmp_V2d); |
| 148 |
tmp_i = __builtin_ia32_ucomisdge(tmp_V2d, tmp_V2d); |
| 149 |
tmp_i = __builtin_ia32_ucomisdneq(tmp_V2d, tmp_V2d); |
| 150 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 0); |
| 151 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 1); |
| 152 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 2); |
| 153 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 3); |
| 154 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 4); |
| 155 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 5); |
| 156 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 6); |
| 157 |
tmp_V4f = __builtin_ia32_cmpps(tmp_V4f, tmp_V4f, 7); |
| 158 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 0); |
| 159 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 1); |
| 160 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 2); |
| 161 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 3); |
| 162 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 4); |
| 163 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 5); |
| 164 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 6); |
| 165 |
tmp_V4f = __builtin_ia32_cmpss(tmp_V4f, tmp_V4f, 7); |
| 166 |
tmp_V4f = __builtin_ia32_minps(tmp_V4f, tmp_V4f); |
| 167 |
tmp_V4f = __builtin_ia32_maxps(tmp_V4f, tmp_V4f); |
| 168 |
tmp_V4f = __builtin_ia32_minss(tmp_V4f, tmp_V4f); |
| 169 |
tmp_V4f = __builtin_ia32_maxss(tmp_V4f, tmp_V4f); |
| 170 |
|
| 171 |
tmp_V8c = __builtin_ia32_paddsb(tmp_V8c, tmp_V8c); |
| 172 |
tmp_V4s = __builtin_ia32_paddsw(tmp_V4s, tmp_V4s); |
| 173 |
tmp_V8c = __builtin_ia32_psubsb(tmp_V8c, tmp_V8c); |
| 174 |
tmp_V4s = __builtin_ia32_psubsw(tmp_V4s, tmp_V4s); |
| 175 |
tmp_V8c = __builtin_ia32_paddusb(tmp_V8c, tmp_V8c); |
| 176 |
tmp_V4s = __builtin_ia32_paddusw(tmp_V4s, tmp_V4s); |
| 177 |
tmp_V8c = __builtin_ia32_psubusb(tmp_V8c, tmp_V8c); |
| 178 |
tmp_V4s = __builtin_ia32_psubusw(tmp_V4s, tmp_V4s); |
| 179 |
tmp_V4s = __builtin_ia32_pmulhw(tmp_V4s, tmp_V4s); |
| 180 |
tmp_V4s = __builtin_ia32_pmulhuw(tmp_V4s, tmp_V4s); |
| 181 |
tmp_V8c = __builtin_ia32_pcmpeqb(tmp_V8c, tmp_V8c); |
| 182 |
tmp_V4s = __builtin_ia32_pcmpeqw(tmp_V4s, tmp_V4s); |
| 183 |
tmp_V2i = __builtin_ia32_pcmpeqd(tmp_V2i, tmp_V2i); |
| 184 |
tmp_V8c = __builtin_ia32_pcmpgtb(tmp_V8c, tmp_V8c); |
| 185 |
tmp_V4s = __builtin_ia32_pcmpgtw(tmp_V4s, tmp_V4s); |
| 186 |
tmp_V2i = __builtin_ia32_pcmpgtd(tmp_V2i, tmp_V2i); |
| 187 |
tmp_V8c = __builtin_ia32_pmaxub(tmp_V8c, tmp_V8c); |
| 188 |
tmp_V4s = __builtin_ia32_pmaxsw(tmp_V4s, tmp_V4s); |
| 189 |
tmp_V8c = __builtin_ia32_pminub(tmp_V8c, tmp_V8c); |
| 190 |
tmp_V4s = __builtin_ia32_pminsw(tmp_V4s, tmp_V4s); |
| 191 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 0); |
| 192 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 1); |
| 193 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 2); |
| 194 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 3); |
| 195 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 4); |
| 196 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 5); |
| 197 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 6); |
| 198 |
tmp_V2d = __builtin_ia32_cmppd(tmp_V2d, tmp_V2d, 7); |
| 199 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 0); |
| 200 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 1); |
| 201 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 2); |
| 202 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 3); |
| 203 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 4); |
| 204 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 5); |
| 205 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 6); |
| 206 |
tmp_V2d = __builtin_ia32_cmpsd(tmp_V2d, tmp_V2d, 7); |
| 207 |
tmp_V2d = __builtin_ia32_minpd(tmp_V2d, tmp_V2d); |
| 208 |
tmp_V2d = __builtin_ia32_maxpd(tmp_V2d, tmp_V2d); |
| 209 |
tmp_V2d = __builtin_ia32_minsd(tmp_V2d, tmp_V2d); |
| 210 |
tmp_V2d = __builtin_ia32_maxsd(tmp_V2d, tmp_V2d); |
| 211 |
tmp_V8s = __builtin_ia32_pmulhw128(tmp_V8s, tmp_V8s); |
| 212 |
tmp_V16c = __builtin_ia32_packsswb128(tmp_V8s, tmp_V8s); |
| 213 |
tmp_V8s = __builtin_ia32_packssdw128(tmp_V4i, tmp_V4i); |
| 214 |
tmp_V16c = __builtin_ia32_packuswb128(tmp_V8s, tmp_V8s); |
| 215 |
tmp_V8s = __builtin_ia32_pmulhuw128(tmp_V8s, tmp_V8s); |
| 216 |
tmp_V4f = __builtin_ia32_addsubps(tmp_V4f, tmp_V4f); |
| 217 |
tmp_V2d = __builtin_ia32_addsubpd(tmp_V2d, tmp_V2d); |
| 218 |
tmp_V4f = __builtin_ia32_haddps(tmp_V4f, tmp_V4f); |
| 219 |
tmp_V2d = __builtin_ia32_haddpd(tmp_V2d, tmp_V2d); |
| 220 |
tmp_V4f = __builtin_ia32_hsubps(tmp_V4f, tmp_V4f); |
| 221 |
tmp_V2d = __builtin_ia32_hsubpd(tmp_V2d, tmp_V2d); |
| 222 |
tmp_V8s = __builtin_ia32_phaddw128(tmp_V8s, tmp_V8s); |
| 223 |
tmp_V4s = __builtin_ia32_phaddw(tmp_V4s, tmp_V4s); |
| 224 |
tmp_V4i = __builtin_ia32_phaddd128(tmp_V4i, tmp_V4i); |
| 225 |
tmp_V2i = __builtin_ia32_phaddd(tmp_V2i, tmp_V2i); |
| 226 |
tmp_V8s = __builtin_ia32_phaddsw128(tmp_V8s, tmp_V8s); |
| 227 |
tmp_V4s = __builtin_ia32_phaddsw(tmp_V4s, tmp_V4s); |
| 228 |
tmp_V8s = __builtin_ia32_phsubw128(tmp_V8s, tmp_V8s); |
| 229 |
tmp_V4s = __builtin_ia32_phsubw(tmp_V4s, tmp_V4s); |
| 230 |
tmp_V4i = __builtin_ia32_phsubd128(tmp_V4i, tmp_V4i); |
| 231 |
tmp_V2i = __builtin_ia32_phsubd(tmp_V2i, tmp_V2i); |
| 232 |
tmp_V8s = __builtin_ia32_phsubsw128(tmp_V8s, tmp_V8s); |
| 233 |
tmp_V4s = __builtin_ia32_phsubsw(tmp_V4s, tmp_V4s); |
| 234 |
tmp_V8s = __builtin_ia32_pmaddubsw128(tmp_V16c, tmp_V16c); |
| 235 |
tmp_V8c = __builtin_ia32_pmaddubsw(tmp_V8c, tmp_V8c); |
| 236 |
tmp_V8s = __builtin_ia32_pmulhrsw128(tmp_V8s, tmp_V8s); |
| 237 |
tmp_V4s = __builtin_ia32_pmulhrsw(tmp_V4s, tmp_V4s); |
| 238 |
tmp_V16c = __builtin_ia32_pshufb128(tmp_V16c, tmp_V16c); |
| 239 |
tmp_V8c = __builtin_ia32_pshufb(tmp_V8c, tmp_V8c); |
| 240 |
tmp_V16c = __builtin_ia32_psignb128(tmp_V16c, tmp_V16c); |
| 241 |
tmp_V8c = __builtin_ia32_psignb(tmp_V8c, tmp_V8c); |
| 242 |
tmp_V8s = __builtin_ia32_psignw128(tmp_V8s, tmp_V8s); |
| 243 |
tmp_V4s = __builtin_ia32_psignw(tmp_V4s, tmp_V4s); |
| 244 |
tmp_V4i = __builtin_ia32_psignd128(tmp_V4i, tmp_V4i); |
| 245 |
tmp_V2i = __builtin_ia32_psignd(tmp_V2i, tmp_V2i); |
| 246 |
tmp_V8c = __builtin_ia32_pabsb(tmp_V8c); |
| 247 |
tmp_V4s = __builtin_ia32_pabsw(tmp_V4s); |
| 248 |
tmp_V2i = __builtin_ia32_pabsd(tmp_V2i); |
| 249 |
tmp_V4s = __builtin_ia32_psllw(tmp_V4s, tmp_V1LLi); |
| 250 |
tmp_V2i = __builtin_ia32_pslld(tmp_V2i, tmp_V1LLi); |
| 251 |
tmp_V1LLi = __builtin_ia32_psllq(tmp_V1LLi, tmp_V1LLi); |
| 252 |
tmp_V4s = __builtin_ia32_psrlw(tmp_V4s, tmp_V1LLi); |
| 253 |
tmp_V2i = __builtin_ia32_psrld(tmp_V2i, tmp_V1LLi); |
| 254 |
tmp_V1LLi = __builtin_ia32_psrlq(tmp_V1LLi, tmp_V1LLi); |
| 255 |
tmp_V4s = __builtin_ia32_psraw(tmp_V4s, tmp_V1LLi); |
| 256 |
tmp_V2i = __builtin_ia32_psrad(tmp_V2i, tmp_V1LLi); |
| 257 |
tmp_V2i = __builtin_ia32_pmaddwd(tmp_V4s, tmp_V4s); |
| 258 |
tmp_V8c = __builtin_ia32_packsswb(tmp_V4s, tmp_V4s); |
| 259 |
tmp_V4s = __builtin_ia32_packssdw(tmp_V2i, tmp_V2i); |
| 260 |
tmp_V8c = __builtin_ia32_packuswb(tmp_V4s, tmp_V4s); |
| 261 |
tmp_i = __builtin_ia32_vec_ext_v2si(tmp_V2i, 0); |
| 262 |
|
| 263 |
__builtin_ia32_incsspd(tmp_Ui); |
| 264 |
__builtin_ia32_incsspq(tmp_ULLi); |
| 265 |
tmp_Ui = __builtin_ia32_rdsspd(tmp_Ui); |
| 266 |
tmp_ULLi = __builtin_ia32_rdsspq(tmp_ULLi); |
| 267 |
__builtin_ia32_saveprevssp(); |
| 268 |
__builtin_ia32_rstorssp(tmp_vp); |
| 269 |
__builtin_ia32_wrssd(tmp_Ui, tmp_vp); |
| 270 |
__builtin_ia32_wrssq(tmp_ULLi, tmp_vp); |
| 271 |
__builtin_ia32_wrussd(tmp_Ui, tmp_vp); |
| 272 |
__builtin_ia32_wrussq(tmp_ULLi, tmp_vp); |
| 273 |
__builtin_ia32_setssbsy(); |
| 274 |
__builtin_ia32_clrssbsy(tmp_vp); |
| 275 |
|
| 276 |
(void) __builtin_ia32_ldmxcsr(tmp_Ui); |
| 277 |
#ifndef OPENCL |
| 278 |
(void) _mm_setcsr(tmp_Ui); |
| 279 |
#endif |
| 280 |
tmp_Ui = __builtin_ia32_stmxcsr(); |
| 281 |
#ifndef OPENCL |
| 282 |
tmp_Ui = _mm_getcsr(); |
| 283 |
#endif |
| 284 |
(void)__builtin_ia32_fxsave(tmp_vp); |
| 285 |
(void)__builtin_ia32_fxsave64(tmp_vp); |
| 286 |
(void)__builtin_ia32_fxrstor(tmp_vp); |
| 287 |
(void)__builtin_ia32_fxrstor64(tmp_vp); |
| 288 |
|
| 289 |
(void)__builtin_ia32_xsave(tmp_vp, tmp_ULLi); |
| 290 |
(void)__builtin_ia32_xsave64(tmp_vp, tmp_ULLi); |
| 291 |
tmp_ULLi = __builtin_ia32_xgetbv(tmp_Ui); |
| 292 |
(void)__builtin_ia32_xsetbv(tmp_Ui, tmp_ULLi); |
| 293 |
(void)__builtin_ia32_xrstor(tmp_vp, tmp_ULLi); |
| 294 |
(void)__builtin_ia32_xrstor64(tmp_vp, tmp_ULLi); |
| 295 |
(void)__builtin_ia32_xsaveopt(tmp_vp, tmp_ULLi); |
| 296 |
(void)__builtin_ia32_xsaveopt64(tmp_vp, tmp_ULLi); |
| 297 |
(void)__builtin_ia32_xrstors(tmp_vp, tmp_ULLi); |
| 298 |
(void)__builtin_ia32_xrstors64(tmp_vp, tmp_ULLi); |
| 299 |
(void)__builtin_ia32_xsavec(tmp_vp, tmp_ULLi); |
| 300 |
(void)__builtin_ia32_xsavec64(tmp_vp, tmp_ULLi); |
| 301 |
(void)__builtin_ia32_xsaves(tmp_vp, tmp_ULLi); |
| 302 |
(void)__builtin_ia32_xsaves64(tmp_vp, tmp_ULLi); |
| 303 |
|
| 304 |
(void) __builtin_ia32_monitorx(tmp_vp, tmp_Ui, tmp_Ui); |
| 305 |
(void) __builtin_ia32_mwaitx(tmp_Ui, tmp_Ui, tmp_Ui); |
| 306 |
(void) __builtin_ia32_clzero(tmp_vp); |
| 307 |
(void) __builtin_ia32_cldemote(tmp_vp); |
| 308 |
|
| 309 |
tmp_V4f = __builtin_ia32_cvtpi2ps(tmp_V4f, tmp_V2i); |
| 310 |
tmp_V2i = __builtin_ia32_cvtps2pi(tmp_V4f); |
| 311 |
tmp_i = __builtin_ia32_cvtss2si(tmp_V4f); |
| 312 |
tmp_i = __builtin_ia32_cvttss2si(tmp_V4f); |
| 313 |
|
| 314 |
tmp_i = __builtin_ia32_rdtsc(); |
| 315 |
tmp_i = __rdtsc(); |
| 316 |
tmp_i = __builtin_ia32_rdtscp(&tmp_Ui); |
| 317 |
tmp_LLi = __builtin_ia32_rdpmc(tmp_i); |
| 318 |
__builtin_ia32_wbnoinvd(); |
| 319 |
#ifdef USE_64 |
| 320 |
tmp_LLi = __builtin_ia32_cvtss2si64(tmp_V4f); |
| 321 |
tmp_LLi = __builtin_ia32_cvttss2si64(tmp_V4f); |
| 322 |
#endif |
| 323 |
tmp_V2i = __builtin_ia32_cvttps2pi(tmp_V4f); |
| 324 |
(void) __builtin_ia32_maskmovq(tmp_V8c, tmp_V8c, tmp_cp); |
| 325 |
tmp_i = __builtin_ia32_movmskps(tmp_V4f); |
| 326 |
tmp_i = __builtin_ia32_pmovmskb(tmp_V8c); |
| 327 |
(void) __builtin_ia32_movntq(tmp_V1LLip, tmp_V1LLi); |
| 328 |
(void) __builtin_ia32_sfence(); |
| 329 |
#ifndef OPENCL |
| 330 |
(void) _mm_sfence(); |
| 331 |
#endif |
| 332 |
|
| 333 |
tmp_V4s = __builtin_ia32_psadbw(tmp_V8c, tmp_V8c); |
| 334 |
tmp_V4f = __builtin_ia32_rcpps(tmp_V4f); |
| 335 |
tmp_V4f = __builtin_ia32_rcpss(tmp_V4f); |
| 336 |
tmp_V4f = __builtin_ia32_rsqrtps(tmp_V4f); |
| 337 |
tmp_V4f = __builtin_ia32_rsqrtss(tmp_V4f); |
| 338 |
tmp_V4f = __builtin_ia32_sqrtps(tmp_V4f); |
| 339 |
tmp_V4f = __builtin_ia32_sqrtss(tmp_V4f); |
| 340 |
(void) __builtin_ia32_maskmovdqu(tmp_V16c, tmp_V16c, tmp_cp); |
| 341 |
tmp_i = __builtin_ia32_movmskpd(tmp_V2d); |
| 342 |
tmp_i = __builtin_ia32_pmovmskb128(tmp_V16c); |
| 343 |
(void) __builtin_ia32_movnti(tmp_ip, tmp_i); |
| 344 |
#ifdef USE_64 |
| 345 |
(void) __builtin_ia32_movnti64(tmp_LLip, tmp_LLi); |
| 346 |
#endif |
| 347 |
tmp_V2LLi = __builtin_ia32_psadbw128(tmp_V16c, tmp_V16c); |
| 348 |
tmp_V2d = __builtin_ia32_sqrtpd(tmp_V2d); |
| 349 |
tmp_V2d = __builtin_ia32_sqrtsd(tmp_V2d); |
| 350 |
tmp_V2LLi = __builtin_ia32_cvtpd2dq(tmp_V2d); |
| 351 |
tmp_V2i = __builtin_ia32_cvtpd2pi(tmp_V2d); |
| 352 |
tmp_V4f = __builtin_ia32_cvtpd2ps(tmp_V2d); |
| 353 |
tmp_V4i = __builtin_ia32_cvttpd2dq(tmp_V2d); |
| 354 |
tmp_V2i = __builtin_ia32_cvttpd2pi(tmp_V2d); |
| 355 |
tmp_V2d = __builtin_ia32_cvtpi2pd(tmp_V2i); |
| 356 |
tmp_i = __builtin_ia32_cvtsd2si(tmp_V2d); |
| 357 |
tmp_i = __builtin_ia32_cvttsd2si(tmp_V2d); |
| 358 |
tmp_V4f = __builtin_ia32_cvtsd2ss(tmp_V4f, tmp_V2d); |
| 359 |
#ifdef USE_64 |
| 360 |
tmp_LLi = __builtin_ia32_cvtsd2si64(tmp_V2d); |
| 361 |
tmp_LLi = __builtin_ia32_cvttsd2si64(tmp_V2d); |
| 362 |
#endif |
| 363 |
tmp_V4i = __builtin_ia32_cvtps2dq(tmp_V4f); |
| 364 |
tmp_V4i = __builtin_ia32_cvttps2dq(tmp_V4f); |
| 365 |
(void) __builtin_ia32_clflush(tmp_vCp); |
| 366 |
#ifndef OPENCL |
| 367 |
(void) _mm_clflush(tmp_vCp); |
| 368 |
#endif |
| 369 |
(void) __builtin_ia32_lfence(); |
| 370 |
#ifndef OPENCL |
| 371 |
(void) _mm_lfence(); |
| 372 |
#endif |
| 373 |
(void) __builtin_ia32_mfence(); |
| 374 |
#ifndef OPENCL |
| 375 |
(void) _mm_mfence(); |
| 376 |
#endif |
| 377 |
(void) __builtin_ia32_pause(); |
| 378 |
#ifndef OPENCL |
| 379 |
(void) _mm_pause(); |
| 380 |
#endif |
| 381 |
|
| 382 |
tmp_V4s = __builtin_ia32_psllwi(tmp_V4s, imm_i_0_8); |
| 383 |
tmp_V2i = __builtin_ia32_pslldi(tmp_V2i, imm_i_0_8); |
| 384 |
tmp_V1LLi = __builtin_ia32_psllqi(tmp_V1LLi, imm_i_0_8); |
| 385 |
tmp_V4s = __builtin_ia32_psrawi(tmp_V4s, imm_i_0_8); |
| 386 |
tmp_V2i = __builtin_ia32_psradi(tmp_V2i, imm_i_0_8); |
| 387 |
tmp_V4s = __builtin_ia32_psrlwi(tmp_V4s, imm_i_0_8); |
| 388 |
tmp_V2i = __builtin_ia32_psrldi(tmp_V2i, imm_i_0_8); |
| 389 |
tmp_V1LLi = __builtin_ia32_psrlqi(tmp_V1LLi, imm_i_0_8); |
| 390 |
|
| 391 |
// Using non-immediate argument supported for gcc compatibility |
| 392 |
tmp_V4s = __builtin_ia32_psllwi(tmp_V4s, tmp_i); |
| 393 |
tmp_V2i = __builtin_ia32_pslldi(tmp_V2i, tmp_i); |
| 394 |
tmp_V1LLi = __builtin_ia32_psllqi(tmp_V1LLi, tmp_i); |
| 395 |
tmp_V4s = __builtin_ia32_psrawi(tmp_V4s, tmp_i); |
| 396 |
tmp_V2i = __builtin_ia32_psradi(tmp_V2i, tmp_i); |
| 397 |
tmp_V4s = __builtin_ia32_psrlwi(tmp_V4s, tmp_i); |
| 398 |
tmp_V2i = __builtin_ia32_psrldi(tmp_V2i, tmp_i); |
| 399 |
tmp_V1LLi = __builtin_ia32_psrlqi(tmp_V1LLi, tmp_i); |
| 400 |
|
| 401 |
tmp_V1LLi = __builtin_ia32_pmuludq(tmp_V2i, tmp_V2i); |
| 402 |
tmp_V2LLi = __builtin_ia32_pmuludq128(tmp_V4i, tmp_V4i); |
| 403 |
tmp_V8s = __builtin_ia32_psraw128(tmp_V8s, tmp_V8s); |
| 404 |
tmp_V4i = __builtin_ia32_psrad128(tmp_V4i, tmp_V4i); |
| 405 |
tmp_V8s = __builtin_ia32_psrlw128(tmp_V8s, tmp_V8s); |
| 406 |
tmp_V4i = __builtin_ia32_psrld128(tmp_V4i, tmp_V4i); |
| 407 |
tmp_V2LLi = __builtin_ia32_psrlq128(tmp_V2LLi, tmp_V2LLi); |
| 408 |
tmp_V8s = __builtin_ia32_psllw128(tmp_V8s, tmp_V8s); |
| 409 |
tmp_V4i = __builtin_ia32_pslld128(tmp_V4i, tmp_V4i); |
| 410 |
tmp_V2LLi = __builtin_ia32_psllq128(tmp_V2LLi, tmp_V2LLi); |
| 411 |
|
| 412 |
tmp_V8s = __builtin_ia32_psllwi128(tmp_V8s, imm_i_0_8); |
| 413 |
tmp_V4i = __builtin_ia32_pslldi128(tmp_V4i, imm_i_0_8); |
| 414 |
tmp_V2LLi = __builtin_ia32_psllqi128(tmp_V2LLi, imm_i_0_8); |
| 415 |
tmp_V8s = __builtin_ia32_psrlwi128(tmp_V8s, imm_i_0_8); |
| 416 |
tmp_V4i = __builtin_ia32_psrldi128(tmp_V4i, imm_i_0_8); |
| 417 |
tmp_V2LLi = __builtin_ia32_psrlqi128(tmp_V2LLi, imm_i_0_8); |
| 418 |
tmp_V8s = __builtin_ia32_psrawi128(tmp_V8s, imm_i_0_8); |
| 419 |
tmp_V4i = __builtin_ia32_psradi128(tmp_V4i, imm_i_0_8); |
| 420 |
|
| 421 |
// Using non-immediate argument supported for gcc compatibility |
| 422 |
tmp_V8s = __builtin_ia32_psllwi128(tmp_V8s, tmp_i); |
| 423 |
tmp_V4i = __builtin_ia32_pslldi128(tmp_V4i, tmp_i); |
| 424 |
tmp_V2LLi = __builtin_ia32_psllqi128(tmp_V2LLi, tmp_i); |
| 425 |
tmp_V8s = __builtin_ia32_psrlwi128(tmp_V8s, tmp_i); |
| 426 |
tmp_V4i = __builtin_ia32_psrldi128(tmp_V4i, tmp_i); |
| 427 |
tmp_V2LLi = __builtin_ia32_psrlqi128(tmp_V2LLi, tmp_i); |
| 428 |
tmp_V8s = __builtin_ia32_psrawi128(tmp_V8s, tmp_i); |
| 429 |
tmp_V4i = __builtin_ia32_psradi128(tmp_V4i, tmp_i); |
| 430 |
|
| 431 |
tmp_V4i = __builtin_ia32_pmaddwd128(tmp_V8s, tmp_V8s); |
| 432 |
(void) __builtin_ia32_monitor(tmp_vp, tmp_Ui, tmp_Ui); |
| 433 |
(void) __builtin_ia32_mwait(tmp_Ui, tmp_Ui); |
| 434 |
tmp_V16c = __builtin_ia32_lddqu(tmp_cCp); |
| 435 |
tmp_V16c = __builtin_ia32_palignr128(tmp_V16c, tmp_V16c, imm_i); |
| 436 |
tmp_V8c = __builtin_ia32_palignr(tmp_V8c, tmp_V8c, imm_i); |
| 437 |
#ifdef USE_SSE4 |
| 438 |
tmp_V16c = __builtin_ia32_pblendvb128(tmp_V16c, tmp_V16c, tmp_V16c); |
| 439 |
tmp_V2d = __builtin_ia32_blendvpd(tmp_V2d, tmp_V2d, tmp_V2d); |
| 440 |
tmp_V4f = __builtin_ia32_blendvps(tmp_V4f, tmp_V4f, tmp_V4f); |
| 441 |
tmp_V8s = __builtin_ia32_packusdw128(tmp_V4i, tmp_V4i); |
| 442 |
tmp_V2LLi = __builtin_ia32_pmuldq128(tmp_V4i, tmp_V4i); |
| 443 |
tmp_V4f = __builtin_ia32_roundps(tmp_V4f, imm_i_0_16); |
| 444 |
tmp_V4f = __builtin_ia32_roundss(tmp_V4f, tmp_V4f, imm_i_0_16); |
| 445 |
tmp_V2d = __builtin_ia32_roundsd(tmp_V2d, tmp_V2d, imm_i_0_16); |
| 446 |
tmp_V2d = __builtin_ia32_roundpd(tmp_V2d, imm_i_0_16); |
| 447 |
tmp_V4f = __builtin_ia32_insertps128(tmp_V4f, tmp_V4f, imm_i_0_256); |
| 448 |
#endif |
| 449 |
|
| 450 |
tmp_V4d = __builtin_ia32_addsubpd256(tmp_V4d, tmp_V4d); |
| 451 |
tmp_V8f = __builtin_ia32_addsubps256(tmp_V8f, tmp_V8f); |
| 452 |
tmp_V4d = __builtin_ia32_haddpd256(tmp_V4d, tmp_V4d); |
| 453 |
tmp_V8f = __builtin_ia32_hsubps256(tmp_V8f, tmp_V8f); |
| 454 |
tmp_V4d = __builtin_ia32_hsubpd256(tmp_V4d, tmp_V4d); |
| 455 |
tmp_V8f = __builtin_ia32_haddps256(tmp_V8f, tmp_V8f); |
| 456 |
tmp_V4d = __builtin_ia32_maxpd256(tmp_V4d, tmp_V4d); |
| 457 |
tmp_V8f = __builtin_ia32_maxps256(tmp_V8f, tmp_V8f); |
| 458 |
tmp_V4d = __builtin_ia32_minpd256(tmp_V4d, tmp_V4d); |
| 459 |
tmp_V8f = __builtin_ia32_minps256(tmp_V8f, tmp_V8f); |
| 460 |
tmp_V2d = __builtin_ia32_vpermilvarpd(tmp_V2d, tmp_V2LLi); |
| 461 |
tmp_V4f = __builtin_ia32_vpermilvarps(tmp_V4f, tmp_V4i); |
| 462 |
tmp_V4d = __builtin_ia32_vpermilvarpd256(tmp_V4d, tmp_V4LLi); |
| 463 |
tmp_V8f = __builtin_ia32_vpermilvarps256(tmp_V8f, tmp_V8i); |
| 464 |
tmp_V4d = __builtin_ia32_blendvpd256(tmp_V4d, tmp_V4d, tmp_V4d); |
| 465 |
tmp_V8f = __builtin_ia32_blendvps256(tmp_V8f, tmp_V8f, tmp_V8f); |
| 466 |
tmp_V8f = __builtin_ia32_dpps256(tmp_V8f, tmp_V8f, 0x7); |
| 467 |
tmp_V4d = __builtin_ia32_cmppd256(tmp_V4d, tmp_V4d, 0); |
| 468 |
tmp_V8f = __builtin_ia32_cmpps256(tmp_V8f, tmp_V8f, 0); |
| 469 |
tmp_V4f = __builtin_ia32_cvtpd2ps256(tmp_V4d); |
| 470 |
tmp_V8i = __builtin_ia32_cvtps2dq256(tmp_V8f); |
| 471 |
tmp_V4i = __builtin_ia32_cvttpd2dq256(tmp_V4d); |
| 472 |
tmp_V4i = __builtin_ia32_cvtpd2dq256(tmp_V4d); |
| 473 |
tmp_V8i = __builtin_ia32_cvttps2dq256(tmp_V8f); |
| 474 |
tmp_V4d = __builtin_ia32_vperm2f128_pd256(tmp_V4d, tmp_V4d, 0x7); |
| 475 |
tmp_V8f = __builtin_ia32_vperm2f128_ps256(tmp_V8f, tmp_V8f, 0x7); |
| 476 |
tmp_V8i = __builtin_ia32_vperm2f128_si256(tmp_V8i, tmp_V8i, 0x7); |
| 477 |
tmp_V4d = __builtin_ia32_sqrtpd256(tmp_V4d); |
| 478 |
tmp_V8f = __builtin_ia32_sqrtps256(tmp_V8f); |
| 479 |
tmp_V8f = __builtin_ia32_rsqrtps256(tmp_V8f); |
| 480 |
tmp_V8f = __builtin_ia32_rcpps256(tmp_V8f); |
| 481 |
tmp_V4d = __builtin_ia32_roundpd256(tmp_V4d, 0x1); |
| 482 |
tmp_V8f = __builtin_ia32_roundps256(tmp_V8f, 0x1); |
| 483 |
tmp_i = __builtin_ia32_vtestzpd(tmp_V2d, tmp_V2d); |
| 484 |
tmp_i = __builtin_ia32_vtestcpd(tmp_V2d, tmp_V2d); |
| 485 |
tmp_i = __builtin_ia32_vtestnzcpd(tmp_V2d, tmp_V2d); |
| 486 |
tmp_i = __builtin_ia32_vtestzps(tmp_V4f, tmp_V4f); |
| 487 |
tmp_i = __builtin_ia32_vtestcps(tmp_V4f, tmp_V4f); |
| 488 |
tmp_i = __builtin_ia32_vtestnzcps(tmp_V4f, tmp_V4f); |
| 489 |
tmp_i = __builtin_ia32_vtestzpd256(tmp_V4d, tmp_V4d); |
| 490 |
tmp_i = __builtin_ia32_vtestcpd256(tmp_V4d, tmp_V4d); |
| 491 |
tmp_i = __builtin_ia32_vtestnzcpd256(tmp_V4d, tmp_V4d); |
| 492 |
tmp_i = __builtin_ia32_vtestzps256(tmp_V8f, tmp_V8f); |
| 493 |
tmp_i = __builtin_ia32_vtestcps256(tmp_V8f, tmp_V8f); |
| 494 |
tmp_i = __builtin_ia32_vtestnzcps256(tmp_V8f, tmp_V8f); |
| 495 |
tmp_i = __builtin_ia32_ptestz256(tmp_V4LLi, tmp_V4LLi); |
| 496 |
tmp_i = __builtin_ia32_ptestc256(tmp_V4LLi, tmp_V4LLi); |
| 497 |
tmp_i = __builtin_ia32_ptestnzc256(tmp_V4LLi, tmp_V4LLi); |
| 498 |
tmp_i = __builtin_ia32_movmskpd256(tmp_V4d); |
| 499 |
tmp_i = __builtin_ia32_movmskps256(tmp_V8f); |
| 500 |
__builtin_ia32_vzeroall(); |
| 501 |
__builtin_ia32_vzeroupper(); |
| 502 |
tmp_V32c = __builtin_ia32_lddqu256(tmp_cCp); |
| 503 |
tmp_V2d = __builtin_ia32_maskloadpd(tmp_V2dCp, tmp_V2LLi); |
| 504 |
tmp_V4f = __builtin_ia32_maskloadps(tmp_V4fCp, tmp_V4i); |
| 505 |
tmp_V4d = __builtin_ia32_maskloadpd256(tmp_V4dCp, tmp_V4LLi); |
| 506 |
tmp_V8f = __builtin_ia32_maskloadps256(tmp_V8fCp, tmp_V8i); |
| 507 |
__builtin_ia32_maskstorepd(tmp_V2dp, tmp_V2LLi, tmp_V2d); |
| 508 |
__builtin_ia32_maskstoreps(tmp_V4fp, tmp_V4i, tmp_V4f); |
| 509 |
__builtin_ia32_maskstorepd256(tmp_V4dp, tmp_V4LLi, tmp_V4d); |
| 510 |
__builtin_ia32_maskstoreps256(tmp_V8fp, tmp_V8i, tmp_V8f); |
| 511 |
|
| 512 |
#if USE_ALL |
| 513 |
tmp_V4i = __builtin_ia32_sha1rnds4(tmp_V4i, tmp_V4i, imm_i_0_4); |
| 514 |
tmp_V4i = __builtin_ia32_sha1nexte(tmp_V4i, tmp_V4i); |
| 515 |
tmp_V4i = __builtin_ia32_sha1msg1(tmp_V4i, tmp_V4i); |
| 516 |
tmp_V4i = __builtin_ia32_sha1msg2(tmp_V4i, tmp_V4i); |
| 517 |
tmp_V4i = __builtin_ia32_sha256rnds2(tmp_V4i, tmp_V4i, tmp_V4i); |
| 518 |
tmp_V4i = __builtin_ia32_sha256msg1(tmp_V4i, tmp_V4i); |
| 519 |
tmp_V4i = __builtin_ia32_sha256msg2(tmp_V4i, tmp_V4i); |
| 520 |
#endif |
| 521 |
} |