mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180125 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -119,7 +119,7 @@ static bool OSHasAVXSupport() {
|
|||||||
// there is no easy way to conditionally compile based on the assembler used.
|
// there is no easy way to conditionally compile based on the assembler used.
|
||||||
int rEAX, rEDX;
|
int rEAX, rEDX;
|
||||||
__asm__ (".byte 0x0f, 0x01, 0xd0" : "=a" (rEAX), "=d" (rEDX) : "c" (0));
|
__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);
|
unsigned long long rEAX = _xgetbv(_XCR_XFEATURE_ENABLED_MASK);
|
||||||
#else
|
#else
|
||||||
int rEAX = 0; // Ensures we return false
|
int rEAX = 0; // Ensures we return false
|
||||||
|
Reference in New Issue
Block a user