Lines Matching refs:Features

300                                 unsigned int Brand_id, unsigned int Features,
478 if (Features & (1 << FEATURE_AVX512)) {
483 if (Features & (1 << FEATURE_ADX)) {
488 if (Features & (1 << FEATURE_AVX2)) {
493 if (Features & (1 << FEATURE_AVX)) {
498 if (Features & (1 << FEATURE_SSE4_2)) {
499 if (Features & (1 << FEATURE_MOVBE)) {
508 if (Features & (1 << FEATURE_SSE4_1)) {
513 if (Features & (1 << FEATURE_SSSE3)) {
514 if (Features & (1 << FEATURE_MOVBE)) {
523 if (Features & (1 << FEATURE_EM64T)) {
527 if (Features & (1 << FEATURE_SSE2)) {
531 if (Features & (1 << FEATURE_SSE)) {
535 if (Features & (1 << FEATURE_MMX)) {
555 ((Features & (1 << FEATURE_EM64T)) ? INTEL_X86_64 : INTEL_PENTIUM_IV);
570 ((Features & (1 << FEATURE_EM64T)) ? INTEL_NOCONA : INTEL_PRESCOTT);
575 ((Features & (1 << FEATURE_EM64T)) ? INTEL_X86_64 : INTEL_PENTIUM_IV);
587 unsigned int Features,
634 if (Features & (1 << FEATURE_SSE3)) {
670 if (!(Features &
694 if (!(Features &
708 unsigned Features = 0;
710 Features |= (((EDX >> 23) & 1) << FEATURE_MMX);
711 Features |= (((EDX >> 25) & 1) << FEATURE_SSE);
712 Features |= (((EDX >> 26) & 1) << FEATURE_SSE2);
713 Features |= (((ECX >> 0) & 1) << FEATURE_SSE3);
714 Features |= (((ECX >> 9) & 1) << FEATURE_SSSE3);
715 Features |= (((ECX >> 19) & 1) << FEATURE_SSE4_1);
716 Features |= (((ECX >> 20) & 1) << FEATURE_SSE4_2);
717 Features |= (((ECX >> 22) & 1) << FEATURE_MOVBE);
731 Features |= (HasAVX << FEATURE_AVX);
732 Features |= (HasAVX2 << FEATURE_AVX2);
733 Features |= (HasAVX512 << FEATURE_AVX512);
734 Features |= (HasAVX512Save << FEATURE_AVX512SAVE);
735 Features |= (HasADX << FEATURE_ADX);
738 Features |= (((EDX >> 29) & 0x1) << FEATURE_EM64T);
739 return Features;
753 unsigned Features = 0;
755 Features = getAvailableFeatures(ECX, EDX, MaxLeaf);
761 getIntelProcessorTypeAndSubtype(Family, Model, Brand_id, Features, &Type,
835 getAMDProcessorTypeAndSubtype(Family, Model, Features, &Type, &Subtype);
1154 bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
1168 Features["cmov"] = (EDX >> 15) & 1;
1169 Features["mmx"] = (EDX >> 23) & 1;
1170 Features["sse"] = (EDX >> 25) & 1;
1171 Features["sse2"] = (EDX >> 26) & 1;
1172 Features["sse3"] = (ECX >> 0) & 1;
1173 Features["ssse3"] = (ECX >> 9) & 1;
1174 Features["sse4.1"] = (ECX >> 19) & 1;
1175 Features["sse4.2"] = (ECX >> 20) & 1;
1177 Features["pclmul"] = (ECX >> 1) & 1;
1178 Features["cx16"] = (ECX >> 13) & 1;
1179 Features["movbe"] = (ECX >> 22) & 1;
1180 Features["popcnt"] = (ECX >> 23) & 1;
1181 Features["aes"] = (ECX >> 25) & 1;
1182 Features["rdrnd"] = (ECX >> 30) & 1;
1189 Features["avx"] = HasAVXSave;
1190 Features["fma"] = HasAVXSave && (ECX >> 12) & 1;
1191 Features["f16c"] = HasAVXSave && (ECX >> 29) & 1;
1194 Features["xsave"] = HasAVXSave && (ECX >> 26) & 1;
1204 Features["lzcnt"] = HasExtLeaf1 && ((ECX >> 5) & 1);
1205 Features["sse4a"] = HasExtLeaf1 && ((ECX >> 6) & 1);
1206 Features["prfchw"] = HasExtLeaf1 && ((ECX >> 8) & 1);
1207 Features["xop"] = HasExtLeaf1 && ((ECX >> 11) & 1) && HasAVXSave;
1208 Features["fma4"] = HasExtLeaf1 && ((ECX >> 16) & 1) && HasAVXSave;
1209 Features["tbm"] = HasExtLeaf1 && ((ECX >> 21) & 1);
1210 Features["mwaitx"] = HasExtLeaf1 && ((ECX >> 29) & 1);
1216 Features["avx2"] = HasAVXSave && HasLeaf7 && ((EBX >> 5) & 1);
1218 Features["fsgsbase"] = HasLeaf7 && ((EBX >> 0) & 1);
1219 Features["sgx"] = HasLeaf7 && ((EBX >> 2) & 1);
1220 Features["bmi"] = HasLeaf7 && ((EBX >> 3) & 1);
1221 Features["hle"] = HasLeaf7 && ((EBX >> 4) & 1);
1222 Features["bmi2"] = HasLeaf7 && ((EBX >> 8) & 1);
1223 Features["invpcid"] = HasLeaf7 && ((EBX >> 10) & 1);
1224 Features["rtm"] = HasLeaf7 && ((EBX >> 11) & 1);
1225 Features["rdseed"] = HasLeaf7 && ((EBX >> 18) & 1);
1226 Features["adx"] = HasLeaf7 && ((EBX >> 19) & 1);
1227 Features["smap"] = HasLeaf7 && ((EBX >> 20) & 1);
1228 Features["pcommit"] = HasLeaf7 && ((EBX >> 22) & 1);
1229 Features["clflushopt"] = HasLeaf7 && ((EBX >> 23) & 1);
1230 Features["clwb"] = HasLeaf7 && ((EBX >> 24) & 1);
1231 Features["sha"] = HasLeaf7 && ((EBX >> 29) & 1);
1234 Features["avx512f"] = HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save;
1235 Features["avx512dq"] = HasLeaf7 && ((EBX >> 17) & 1) && HasAVX512Save;
1236 Features["avx512ifma"] = HasLeaf7 && ((EBX >> 21) & 1) && HasAVX512Save;
1237 Features["avx512pf"] = HasLeaf7 && ((EBX >> 26) & 1) && HasAVX512Save;
1238 Features["avx512er"] = HasLeaf7 && ((EBX >> 27) & 1) && HasAVX512Save;
1239 Features["avx512cd"] = HasLeaf7 && ((EBX >> 28) & 1) && HasAVX512Save;
1240 Features["avx512bw"] = HasLeaf7 && ((EBX >> 30) & 1) && HasAVX512Save;
1241 Features["avx512vl"] = HasLeaf7 && ((EBX >> 31) & 1) && HasAVX512Save;
1243 Features["prefetchwt1"] = HasLeaf7 && (ECX & 1);
1244 Features["avx512vbmi"] = HasLeaf7 && ((ECX >> 1) & 1) && HasAVX512Save;
1246 Features["pku"] = HasLeaf7 && ((ECX >> 4) & 1);
1252 Features["xsaveopt"] = HasAVXSave && HasLeafD && ((EAX >> 0) & 1);
1253 Features["xsavec"] = HasAVXSave && HasLeafD && ((EAX >> 1) & 1);
1254 Features["xsaves"] = HasAVXSave && HasLeafD && ((EAX >> 3) & 1);
1259 bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
1260 // Read 1024 bytes from /proc/cpuinfo, which should contain the Features line
1276 if (Lines[I].startswith("Features")) {
1318 Features[LLVMFeatureStr] = true;
1324 Features["crypto"] = true;
1330 bool sys::getHostCPUFeatures(StringMap<bool> &Features) { return false; }