diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2013-04-23 17:38:44 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2013-04-23 17:38:44 +0000 |
commit | 31c0adc68c33665966d1821d0ff4ca24a6eec47b (patch) | |
tree | 4f125e68f3d70aaad6802a5ffb0ff9eb997d38c0 /llvm/lib | |
parent | 117f075f6e73c8bf992484a7eb2b0aced5bb6be8 (diff) | |
download | bcm5719-llvm-31c0adc68c33665966d1821d0ff4ca24a6eec47b.tar.gz bcm5719-llvm-31c0adc68c33665966d1821d0ff4ca24a6eec47b.zip |
Testing for _XCR_XFEATURE_ENABLED_MASK instead of a specific MSVC version because some MSVC 2010 SP1 installations do not have the _xgetbv intrinsic. Patch thanks to Serge Pavlov!
llvm-svn: 180125
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Support/Host.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index 445b3449680..27c99c89aee 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -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 |