aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/Host.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/Host.cpp')
-rw-r--r--lib/Support/Host.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Support/Host.cpp b/lib/Support/Host.cpp
index 372b7fc..c353cc6 100644
--- a/lib/Support/Host.cpp
+++ b/lib/Support/Host.cpp
@@ -113,7 +113,8 @@ static bool GetX86CpuIDAndInfo(unsigned value, unsigned *rEAX,
}
static bool OSHasAVXSupport() {
-#if defined(__GNUC__)
+#if defined( __GNUC__ ) && \
+ (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4)
int rEAX, rEDX;
__asm__ ("xgetbv" : "=a" (rEAX), "=d" (rEDX) : "c" (0));
#elif defined(_MSC_VER)