[llvm-commits] [llvm] r134768 - in /llvm/trunk/lib/Target/X86: MCTargetDesc/X86MCTargetDesc.cpp X86Subtarget.cpp
Eli Friedman
eli.friedman at gmail.com
Fri Jul 8 16:07:42 PDT 2011
Author: efriedma
Date: Fri Jul 8 18:07:42 2011
New Revision: 134768
URL: http://llvm.org/viewvc/llvm-project?rev=134768&view=rev
Log:
Revert earlier unnecessary hack. Make sure we correctly force on 64bit and cmov for 64-bit targets.
Modified:
llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
llvm/trunk/lib/Target/X86/X86Subtarget.cpp
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp?rev=134768&r1=134767&r2=134768&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp Fri Jul 8 18:07:42 2011
@@ -35,7 +35,7 @@
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";
}
Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=134768&r1=134767&r2=134768&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Fri Jul 8 18:07:42 2011
@@ -269,9 +269,14 @@
// 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
More information about the llvm-commits
mailing list