cbalint13 wrote: @DavidSpickett ,
> * We can limit to list flags only for a desired e.g. -mcpu=XYZ, so the user > can query like: > Let me know if it would be another interesting command-line feature, I'll be > happy doing it in a subsecvent PR. Implemented the -mcpu filter option too. ``` $ ./bin/clang --target=x86_64-unknown-linux-gnu -mcpu=sandybridge --print-supported-extensions clang version 18.0.0 (https://github.com/cbalint13/llvm-project 4a1fe09b189f100e2fb53105bbcd7b15b8adf4f8) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/cbalint/work/GITHUB/llvm-project/build/./bin All available -march extensions for x86-64 and -mcpu sandybridge 64bit Support 64-bit instructions 64bit-mode 64-bit mode (x86_64) avx Enable AVX instructions cmov Enable conditional move instructions crc32 Enable SSE 4.2 CRC32 instruction (used when SSE4.2 is ... cx16 64-bit with cmpxchg16b (this is true for most x86-64 chips ... cx8 Support CMPXCHG8B instructions false-deps-popcnt POPCNT has a false dependency on dest register fast-15bytenop Target can quickly decode up to 15 byte NOPs fast-scalar-fsqrt Scalar SQRT is fast (disable Newton-Raphson) fast-shld-rotate SHLD can be used as a faster rotate fxsr Support fxsave/fxrestore instructions idivq-to-divl Use 32-bit divide for positive values less than 2^32 macrofusion Various instructions can be fused with conditional branches mmx Enable MMX instructions no-bypass-delay-mov Has no bypass delay when using the 'wrong' mov type nopl Enable NOPL instruction (generally pentium pro+) pclmul Enable packed carry-less multiplication instructions popcnt Support POPCNT instruction sahf Support LAHF and SAHF instructions in 64-bit mode slow-3ops-lea LEA instruction with 3 ops or certain registers is slow slow-unaligned-mem-32 Slow unaligned 32-byte memory access sse Enable SSE instructions sse2 Enable SSE2 instructions sse3 Enable SSE3 instructions sse4.1 Enable SSE 4.1 instructions sse4.2 Enable SSE 4.2 instructions ssse3 Enable SSSE3 instructions vzeroupper Should insert vzeroupper instructions x87 Enable X87 float instructions xsave Support xsave instructions xsaveopt Support xsaveopt instructions ``` https://github.com/llvm/llvm-project/pull/66586 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits