aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2013-05-03 02:52:21 +0000
committerAaron Ballman <aaron@aaronballman.com>2013-05-03 02:52:21 +0000
commit3ff641f22215d0add0ab29648c7fca45af34ffda (patch)
tree5747a0f3e20f7eeb96e82ac135a44b7b32001945 /lib
parentf57563b61b0b3604a25c6388714068713e027e18 (diff)
Unbreaking the non-x86 build bots by protecting the AVX test code properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86Subtarget.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp
index 90e6b700ef..b2eff5e559 100644
--- a/lib/Target/X86/X86Subtarget.cpp
+++ b/lib/Target/X86/X86Subtarget.cpp
@@ -171,6 +171,7 @@ bool X86Subtarget::IsLegalToCallImmediateAddr(const TargetMachine &TM) const {
}
static bool OSHasAVXSupport() {
+#if defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86)
#if defined(__GNUC__)
// Check xgetbv; this uses a .byte sequence instead of the instruction
// directly because older assemblers do not include support for xgetbv and
@@ -183,6 +184,9 @@ static bool OSHasAVXSupport() {
int rEAX = 0; // Ensures we return false
#endif
return (rEAX & 6) == 6;
+#else
+ return false;
+#endif
}
void X86Subtarget::AutoDetectSubtargetFeatures() {