[cfe-commits] r71069 - in /cfe/trunk: lib/Basic/Targets.cpp lib/Driver/Tools.cpp test/Driver/clang-translation.c
Daniel Dunbar
daniel at zuster.org
Tue May 5 21:58:16 PDT 2009
Author: ddunbar
Date: Tue May 5 23:58:14 2009
New Revision: 71069
URL: http://llvm.org/viewvc/llvm-project?rev=71069&view=rev
Log:
Tweak x86 -mcpu defaults.
- Default to yonah on Darwin (to get SSE3).
- Default to Pentium4 (32-bit) and x86-64 (64-bit) on
non-Darwin. Welcome to the 21st century.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/clang-translation.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=71069&r1=71068&r2=71069&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Tue May 5 23:58:14 2009
@@ -565,6 +565,9 @@
if (CPU == "core2")
Features["ssse3"] = Features["sse3"] = Features["sse2"] = Features["sse"] =
Features["mmx"] = true;
+ else if (CPU == "yonah")
+ Features["sse3"] = Features["sse2"] = Features["sse"] =
+ Features["mmx"] = true;
else if (CPU == "pentium4")
Features["sse2"] = Features["sse"] = Features["mmx"] = true;
}
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=71069&r1=71068&r2=71069&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue May 5 23:58:14 2009
@@ -341,6 +341,11 @@
if (getToolChain().getArchName() == "x86_64")
CmdArgs.push_back("--mcpu=core2");
else if (getToolChain().getArchName() == "i386")
+ CmdArgs.push_back("--mcpu=yonah");
+ } else {
+ if (getToolChain().getArchName() == "x86_64")
+ CmdArgs.push_back("--mcpu=x86-64");
+ else if (getToolChain().getArchName() == "i386")
CmdArgs.push_back("--mcpu=pentium4");
}
}
Modified: cfe/trunk/test/Driver/clang-translation.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-translation.c?rev=71069&r1=71068&r2=71069&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang-translation.c (original)
+++ cfe/trunk/test/Driver/clang-translation.c Tue May 5 23:58:14 2009
@@ -10,7 +10,7 @@
// RUN: grep '"-o" .*clang-translation\.c\.out\.tmp\.s' %t.log &&
// RUN: grep '"--asm-verbose"' %t.log &&
// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S %s -o %t.s 2> %t.log
-// RUN: grep '"--mcpu=pentium4"' %t.log &&
+// RUN: grep '"--mcpu=yonah"' %t.log &&
// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -o %t.s 2> %t.log
// RUN: grep '"--mcpu=core2"' %t.log &&
// RUN: true
More information about the cfe-commits
mailing list