Testing for _XCR_XFEATURE_ENABLED_MASK instead of a specific MSVC version because...
authorAaron Ballman <aaron@aaronballman.com>
Tue, 23 Apr 2013 17:38:44 +0000 (17:38 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 23 Apr 2013 17:38:44 +0000 (17:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180125 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Host.cpp

index 445b3449680ff836cc12919948e419e22b0deaef..27c99c89aeee059af03f1556e6c52ad52803a10f 100644 (file)
@@ -119,7 +119,7 @@ static bool OSHasAVXSupport() {
   // there is no easy way to conditionally compile based on the assembler used.
   int rEAX, rEDX;
   __asm__ (".byte 0x0f, 0x01, 0xd0" : "=a" (rEAX), "=d" (rEDX) : "c" (0));
-#elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040219
+#elif defined(_MSC_FULL_VER) && defined(_XCR_XFEATURE_ENABLED_MASK)
   unsigned long long rEAX = _xgetbv(_XCR_XFEATURE_ENABLED_MASK);
 #else
   int rEAX = 0; // Ensures we return false