Index: packages/Python/lldbsuite/test/functionalities/register/intel_avx/TestYMMRegister.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/register/intel_avx/TestYMMRegister.py +++ packages/Python/lldbsuite/test/functionalities/register/intel_avx/TestYMMRegister.py @@ -51,6 +51,10 @@ break self.assertTrue(matched, STOPPED_DUE_TO_SIGNAL) + # Detect AVX2 support and early exit otherwise. + if self.frame().FindVariable("haveAVX2").GetValue() == "0": + return False + if self.getArchitecture() == 'x86_64': register_range = 16 else: Index: packages/Python/lldbsuite/test/functionalities/register/intel_avx/main.c =================================================================== --- packages/Python/lldbsuite/test/functionalities/register/intel_avx/main.c +++ packages/Python/lldbsuite/test/functionalities/register/intel_avx/main.c @@ -6,7 +6,6 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// - void func() { unsigned int ymmvalues[16]; unsigned char val; @@ -17,6 +16,14 @@ ymmvalues[i] = (val << 24) | (val << 16) | (val << 8) | val; } + // Detect AVX2. + static volatile unsigned haveAVX2; +#ifdef _MSC_VER + haveAVX2 = 1; // TODO: Implement this for MSVC. +#else + haveAVX2 = __builtin_cpu_supports("avx2"); +#endif + unsigned int ymmallones = 0xFFFFFFFF; __asm__("int3;" "vbroadcastss %1, %%ymm0;"