summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86Subtarget.cpp
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
commitcc958f0050b14d8c2f34d5e8e8cfe713d433f716 (patch)
tree297568f609a5e1a8942987bf886b8d1495f57ab6 /llvm/lib/Target/X86/X86Subtarget.cpp
parent63fe014888370c18aec41ba0a7b56e513c5e4f07 (diff)
downloadbcm5719-llvm-cc958f0050b14d8c2f34d5e8e8cfe713d433f716.tar.gz
bcm5719-llvm-cc958f0050b14d8c2f34d5e8e8cfe713d433f716.zip
Unbreaking the non-x86 build bots by protecting the AVX test code properly.
llvm-svn: 180992
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.cpp')
-rw-r--r--llvm/lib/Target/X86/X86Subtarget.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp
index 90e6b700ef5..b2eff5e5591 100644
--- a/llvm/lib/Target/X86/X86Subtarget.cpp
+++ b/llvm/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() {
OpenPOWER on IntegriCloud