- 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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71069
91177308-0d34-0410-b5e6-
96231b3b80d8
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;
}
if (memcmp(getToolChain().getOS().c_str(), "darwin", 6) == 0) {
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");
}
// 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