Lines Matching full:features

402   // Look for the CPU features.
405 if (Lines[I].starts_with("features")) {
676 // Read control register 0 (XCR0). Used to detect features such as AVX.
707 #define testFeature(F) (Features[F / 32] & (1 << (F % 32))) != 0
711 const unsigned *Features,
1072 const unsigned *Features,
1245 unsigned *Features) {
1249 Features[F / 32] |= 1U << (F % 32);
1388 unsigned Features[(X86::CPU_FEATURE_MAX + 31) / 32] = {0};
1390 getAvailableFeatures(ECX, EDX, MaxLeaf, Features);
1400 CPU = getIntelProcessorTypeAndSubtype(Family, Model, Features, &Type,
1403 CPU = getAMDProcessorTypeAndSubtype(Family, Model, Features, &Type,
1743 StringMap<bool> Features;
1746 return Features;
1750 Features["cx8"] = (EDX >> 8) & 1;
1751 Features["cmov"] = (EDX >> 15) & 1;
1752 Features["mmx"] = (EDX >> 23) & 1;
1753 Features["fxsr"] = (EDX >> 24) & 1;
1754 Features["sse"] = (EDX >> 25) & 1;
1755 Features["sse2"] = (EDX >> 26) & 1;
1757 Features["sse3"] = (ECX >> 0) & 1;
1758 Features["pclmul"] = (ECX >> 1) & 1;
1759 Features["ssse3"] = (ECX >> 9) & 1;
1760 Features["cx16"] = (ECX >> 13) & 1;
1761 Features["sse4.1"] = (ECX >> 19) & 1;
1762 Features["sse4.2"] = (ECX >> 20) & 1;
1763 Features["crc32"] = Features["sse4.2"];
1764 Features["movbe"] = (ECX >> 22) & 1;
1765 Features["popcnt"] = (ECX >> 23) & 1;
1766 Features["aes"] = (ECX >> 25) & 1;
1767 Features["rdrnd"] = (ECX >> 30) & 1;
1787 Features["avx"] = HasAVXSave;
1788 Features["fma"] = ((ECX >> 12) & 1) && HasAVXSave;
1790 Features["xsave"] = ((ECX >> 26) & 1) && HasAVXSave;
1791 Features["f16c"] = ((ECX >> 29) & 1) && HasAVXSave;
1798 Features["sahf"] = HasExtLeaf1 && ((ECX >> 0) & 1);
1799 Features["lzcnt"] = HasExtLeaf1 && ((ECX >> 5) & 1);
1800 Features["sse4a"] = HasExtLeaf1 && ((ECX >> 6) & 1);
1801 Features["prfchw"] = HasExtLeaf1 && ((ECX >> 8) & 1);
1802 Features["xop"] = HasExtLeaf1 && ((ECX >> 11) & 1) && HasAVXSave;
1803 Features["lwp"] = HasExtLeaf1 && ((ECX >> 15) & 1);
1804 Features["fma4"] = HasExtLeaf1 && ((ECX >> 16) & 1) && HasAVXSave;
1805 Features["tbm"] = HasExtLeaf1 && ((ECX >> 21) & 1);
1806 Features["mwaitx"] = HasExtLeaf1 && ((ECX >> 29) & 1);
1808 Features["64bit"] = HasExtLeaf1 && ((EDX >> 29) & 1);
1810 // Miscellaneous memory related features, detected by
1814 Features["clzero"] = HasExtLeaf8 && ((EBX >> 0) & 1);
1815 Features["rdpru"] = HasExtLeaf8 && ((EBX >> 4) & 1);
1816 Features["wbnoinvd"] = HasExtLeaf8 && ((EBX >> 9) & 1);
1821 Features["fsgsbase"] = HasLeaf7 && ((EBX >> 0) & 1);
1822 Features["sgx"] = HasLeaf7 && ((EBX >> 2) & 1);
1823 Features["bmi"] = HasLeaf7 && ((EBX >> 3) & 1);
1825 Features["avx2"] = HasLeaf7 && ((EBX >> 5) & 1) && HasAVXSave;
1826 Features["bmi2"] = HasLeaf7 && ((EBX >> 8) & 1);
1827 Features["invpcid"] = HasLeaf7 && ((EBX >> 10) & 1);
1828 Features["rtm"] = HasLeaf7 && ((EBX >> 11) & 1);
1830 Features["avx512f"] = HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save;
1831 if (Features["avx512f"])
1832 Features["evex512"] = true;
1833 Features["avx512dq"] = HasLeaf7 && ((EBX >> 17) & 1) && HasAVX512Save;
1834 Features["rdseed"] = HasLeaf7 && ((EBX >> 18) & 1);
1835 Features["adx"] = HasLeaf7 && ((EBX >> 19) & 1);
1836 Features["avx512ifma"] = HasLeaf7 && ((EBX >> 21) & 1) && HasAVX512Save;
1837 Features["clflushopt"] = HasLeaf7 && ((EBX >> 23) & 1);
1838 Features["clwb"] = HasLeaf7 && ((EBX >> 24) & 1);
1839 Features["avx512cd"] = HasLeaf7 && ((EBX >> 28) & 1) && HasAVX512Save;
1840 Features["sha"] = HasLeaf7 && ((EBX >> 29) & 1);
1841 Features["avx512bw"] = HasLeaf7 && ((EBX >> 30) & 1) && HasAVX512Save;
1842 Features["avx512vl"] = HasLeaf7 && ((EBX >> 31) & 1) && HasAVX512Save;
1844 Features["avx512vbmi"] = HasLeaf7 && ((ECX >> 1) & 1) && HasAVX512Save;
1845 Features["pku"] = HasLeaf7 && ((ECX >> 4) & 1);
1846 Features["waitpkg"] = HasLeaf7 && ((ECX >> 5) & 1);
1847 Features["avx512vbmi2"] = HasLeaf7 && ((ECX >> 6) & 1) && HasAVX512Save;
1848 Features["shstk"] = HasLeaf7 && ((ECX >> 7) & 1);
1849 Features["gfni"] = HasLeaf7 && ((ECX >> 8) & 1);
1850 Features["vaes"] = HasLeaf7 && ((ECX >> 9) & 1) && HasAVXSave;
1851 Features["vpclmulqdq"] = HasLeaf7 && ((ECX >> 10) & 1) && HasAVXSave;
1852 Features["avx512vnni"] = HasLeaf7 && ((ECX >> 11) & 1) && HasAVX512Save;
1853 Features["avx512bitalg"] = HasLeaf7 && ((ECX >> 12) & 1) && HasAVX512Save;
1854 Features["avx512vpopcntdq"] = HasLeaf7 && ((ECX >> 14) & 1) && HasAVX512Save;
1855 Features["rdpid"] = HasLeaf7 && ((ECX >> 22) & 1);
1856 Features["kl"] = HasLeaf7 && ((ECX >> 23) & 1); // key locker
1857 Features["cldemote"] = HasLeaf7 && ((ECX >> 25) & 1);
1858 Features["movdiri"] = HasLeaf7 && ((ECX >> 27) & 1);
1859 Features["movdir64b"] = HasLeaf7 && ((ECX >> 28) & 1);
1860 Features["enqcmd"] = HasLeaf7 && ((ECX >> 29) & 1);
1862 Features["uintr"] = HasLeaf7 && ((EDX >> 5) & 1);
1863 Features["avx512vp2intersect"] =
1865 Features["serialize"] = HasLeaf7 && ((EDX >> 14) & 1);
1866 Features["tsxldtrk"] = HasLeaf7 && ((EDX >> 16) & 1);
1875 // detecting features using the "-march=native" flag.
1877 Features["pconfig"] = HasLeaf7 && ((EDX >> 18) & 1);
1878 Features["amx-bf16"] = HasLeaf7 && ((EDX >> 22) & 1) && HasAMXSave;
1879 Features["avx512fp16"] = HasLeaf7 && ((EDX >> 23) & 1) && HasAVX512Save;
1880 Features["amx-tile"] = HasLeaf7 && ((EDX >> 24) & 1) && HasAMXSave;
1881 Features["amx-int8"] = HasLeaf7 && ((EDX >> 25) & 1) && HasAMXSave;
1887 Features["sha512"] = HasLeaf7Subleaf1 && ((EAX >> 0) & 1);
1888 Features["sm3"] = HasLeaf7Subleaf1 && ((EAX >> 1) & 1);
1889 Features["sm4"] = HasLeaf7Subleaf1 && ((EAX >> 2) & 1);
1890 Features["raoint"] = HasLeaf7Subleaf1 && ((EAX >> 3) & 1);
1891 Features["avxvnni"] = HasLeaf7Subleaf1 && ((EAX >> 4) & 1) && HasAVXSave;
1892 Features["avx512bf16"] = HasLeaf7Subleaf1 && ((EAX >> 5) & 1) && HasAVX512Save;
1893 Features["amx-fp16"] = HasLeaf7Subleaf1 && ((EAX >> 21) & 1) && HasAMXSave;
1894 Features["cmpccxadd"] = HasLeaf7Subleaf1 && ((EAX >> 7) & 1);
1895 Features["hreset"] = HasLeaf7Subleaf1 && ((EAX >> 22) & 1);
1896 Features["avxifma"] = HasLeaf7Subleaf1 && ((EAX >> 23) & 1) && HasAVXSave;
1897 Features["avxvnniint8"] = HasLeaf7Subleaf1 && ((EDX >> 4) & 1) && HasAVXSave;
1898 Features["avxneconvert"] = HasLeaf7Subleaf1 && ((EDX >> 5) & 1) && HasAVXSave;
1899 Features["amx-complex"] = HasLeaf7Subleaf1 && ((EDX >> 8) & 1) && HasAMXSave;
1900 Features["avxvnniint16"] = HasLeaf7Subleaf1 && ((EDX >> 10) & 1) && HasAVXSave;
1901 Features["prefetchi"] = HasLeaf7Subleaf1 && ((EDX >> 14) & 1);
1902 Features["usermsr"] = HasLeaf7Subleaf1 && ((EDX >> 15) & 1);
1903 Features["avx10.1-256"] = HasLeaf7Subleaf1 && ((EDX >> 19) & 1);
1905 Features["egpr"] = HasAPXF;
1906 Features["push2pop2"] = HasAPXF;
1907 Features["ppx"] = HasAPXF;
1908 Features["ndd"] = HasAPXF;
1909 Features["ccmp"] = HasAPXF;
1910 Features["cf"] = HasAPXF;
1916 Features["xsaveopt"] = HasLeafD && ((EAX >> 0) & 1) && HasAVXSave;
1917 Features["xsavec"] = HasLeafD && ((EAX >> 1) & 1) && HasAVXSave;
1918 Features["xsaves"] = HasLeafD && ((EAX >> 3) & 1) && HasAVXSave;
1923 Features["ptwrite"] = HasLeaf14 && ((EBX >> 4) & 1);
1927 Features["widekl"] = HasLeaf7 && HasLeaf19 && ((EBX >> 2) & 1);
1931 Features["avx10.1-512"] =
1932 Features["avx10.1-256"] && HasLeaf24 && ((EBX >> 18) & 1);
1934 return Features;
1938 StringMap<bool> Features;
1941 return Features;
1948 // Look for the CPU features.
1950 if (Lines[I].starts_with("Features")) {
1956 // Keep track of which crypto features we have seen
1995 Features[LLVMFeatureStr] = true;
2001 Features["crypto"] = true;
2004 return Features;
2008 StringMap<bool> Features;
2011 Features["neon"] = true;
2013 Features["crc"] = true;
2015 Features["crypto"] = true;
2017 return Features;
2027 StringMap<bool> Features;
2029 Features["f"] = HasFPU && (cpucfg2 & (1U << 1)); // CPUCFG.2.FP_SP
2030 Features["d"] = HasFPU && (cpucfg2 & (1U << 2)); // CPUCFG.2.FP_DP
2032 Features["lsx"] = hwcap & (1UL << 4); // HWCAP_LOONGARCH_LSX
2033 Features["lasx"] = hwcap & (1UL << 5); // HWCAP_LOONGARCH_LASX
2034 Features["lvz"] = hwcap & (1UL << 9); // HWCAP_LOONGARCH_LVZ
2036 return Features;
2053 StringMap<bool> Features;
2057 Features["i"] = true;
2058 Features["m"] = true;
2059 Features["a"] = true;
2063 Features["f"] = ExtMask & (1 << 0); // RISCV_HWPROBE_IMA_FD
2064 Features["d"] = ExtMask & (1 << 0); // RISCV_HWPROBE_IMA_FD
2065 Features["c"] = ExtMask & (1 << 1); // RISCV_HWPROBE_IMA_C
2066 Features["v"] = ExtMask & (1 << 2); // RISCV_HWPROBE_IMA_V
2067 Features["zba"] = ExtMask & (1 << 3); // RISCV_HWPROBE_EXT_ZBA
2068 Features["zbb"] = ExtMask & (1 << 4); // RISCV_HWPROBE_EXT_ZBB
2069 Features["zbs"] = ExtMask & (1 << 5); // RISCV_HWPROBE_EXT_ZBS
2070 Features["zicboz"] = ExtMask & (1 << 6); // RISCV_HWPROBE_EXT_ZICBOZ
2071 Features["zbc"] = ExtMask & (1 << 7); // RISCV_HWPROBE_EXT_ZBC
2072 Features["zbkb"] = ExtMask & (1 << 8); // RISCV_HWPROBE_EXT_ZBKB
2073 Features["zbkc"] = ExtMask & (1 << 9); // RISCV_HWPROBE_EXT_ZBKC
2074 Features["zbkx"] = ExtMask & (1 << 10); // RISCV_HWPROBE_EXT_ZBKX
2075 Features["zknd"] = ExtMask & (1 << 11); // RISCV_HWPROBE_EXT_ZKND
2076 Features["zkne"] = ExtMask & (1 << 12); // RISCV_HWPROBE_EXT_ZKNE
2077 Features["zknh"] = ExtMask & (1 << 13); // RISCV_HWPROBE_EXT_ZKNH
2078 Features["zksed"] = ExtMask & (1 << 14); // RISCV_HWPROBE_EXT_ZKSED
2079 Features["zksh"] = ExtMask & (1 << 15); // RISCV_HWPROBE_EXT_ZKSH
2080 Features["zkt"] = ExtMask & (1 << 16); // RISCV_HWPROBE_EXT_ZKT
2081 Features["zvbb"] = ExtMask & (1 << 17); // RISCV_HWPROBE_EXT_ZVBB
2082 Features["zvbc"] = ExtMask & (1 << 18); // RISCV_HWPROBE_EXT_ZVBC
2083 Features["zvkb"] = ExtMask & (1 << 19); // RISCV_HWPROBE_EXT_ZVKB
2084 Features["zvkg"] = ExtMask & (1 << 20); // RISCV_HWPROBE_EXT_ZVKG
2085 Features["zvkned"] = ExtMask & (1 << 21); // RISCV_HWPROBE_EXT_ZVKNED
2086 Features["zvknha"] = ExtMask & (1 << 22); // RISCV_HWPROBE_EXT_ZVKNHA
2087 Features["zvknhb"] = ExtMask & (1 << 23); // RISCV_HWPROBE_EXT_ZVKNHB
2088 Features["zvksed"] = ExtMask & (1 << 24); // RISCV_HWPROBE_EXT_ZVKSED
2089 Features["zvksh"] = ExtMask & (1 << 25); // RISCV_HWPROBE_EXT_ZVKSH
2090 Features["zvkt"] = ExtMask & (1 << 26); // RISCV_HWPROBE_EXT_ZVKT
2091 Features["zfh"] = ExtMask & (1 << 27); // RISCV_HWPROBE_EXT_ZFH
2092 Features["zfhmin"] = ExtMask & (1 << 28); // RISCV_HWPROBE_EXT_ZFHMIN
2093 Features["zihintntl"] = ExtMask & (1 << 29); // RISCV_HWPROBE_EXT_ZIHINTNTL
2094 Features["zvfh"] = ExtMask & (1 << 30); // RISCV_HWPROBE_EXT_ZVFH
2095 Features["zvfhmin"] = ExtMask & (1ULL << 31); // RISCV_HWPROBE_EXT_ZVFHMIN
2096 Features["zfa"] = ExtMask & (1ULL << 32); // RISCV_HWPROBE_EXT_ZFA
2097 Features["ztso"] = ExtMask & (1ULL << 33); // RISCV_HWPROBE_EXT_ZTSO
2099 // Features["zacas"] = ExtMask & (1ULL << 34); // RISCV_HWPROBE_EXT_ZACAS
2100 Features["zicond"] = ExtMask & (1ULL << 35); // RISCV_HWPROBE_EXT_ZICOND
2101 Features["zihintpause"] =
2107 return Features;