[Lldb-commits] [PATCH] D41962: Fix TestYMMRegisters for older machines without AVX2

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 12 08:58:14 PST 2018

aprantl added a comment.

In https://reviews.llvm.org/D41962#974656, @jasonmolenda wrote:

> I suppose a possible alternative would be to figure out the avx2 / avx512 features manually based on the cpuid instead of letting the compiler do it for us.  e.g. https://stackoverflow.com/questions/1666093/cpuid-implementations-in-c and then checking the bits as e.g. described in https://en.wikipedia.org/wiki/CPUID .  Bummer to do it so low level if we can delegate this to the compiler though.

I don't know MSVC well enough and don't have access to one to test it but: This would also only work if there were a compiler-independent way of writing inline assembler. Is that possible?

Other fun facts: Clang doesn't even define `__builtin_cpu_init()`.



More information about the lldb-commits mailing list