Revert earlier unnecessary hack. Make sure we correctly force on 64bit and cmov for 64-bit targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134768 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Friedman 2011-07-08 23:07:42 +00:00
parent eb0caa1154
commit 6dfef6605f
2 changed files with 9 additions and 4 deletions

View File

@ -35,7 +35,7 @@ using namespace llvm;
std::string X86_MC::ParseX86Triple(StringRef TT) {
Triple TheTriple(TT);
if (TheTriple.getArch() == Triple::x86_64)
return "+64bit-mode,+64bit,+sse2";
return "+64bit-mode";
return "-64bit-mode";
}

View File

@ -269,9 +269,14 @@ X86Subtarget::X86Subtarget(const std::string &TT, const std::string &CPU,
// Otherwise, use CPUID to auto-detect feature set.
AutoDetectSubtargetFeatures();
// Make sure SSE2 is enabled; it is available on all X86-64 CPUs.
if (In64BitMode && !HasAVX && X86SSELevel < SSE2)
X86SSELevel = SSE2;
// Make sure 64-bit features are available in 64-bit mode.
if (In64BitMode) {
HasX86_64 = true;
HasCMov = true;
if (!HasAVX && X86SSELevel < SSE2)
X86SSELevel = SSE2;
}
}
DEBUG(dbgs() << "Subtarget features: SSELevel " << X86SSELevel