[Lldb-commits] [lldb] r175700 - Fixed a bug where certain vector code didn't
Sean Callanan
scallanan at apple.com
Wed Feb 20 17:04:23 PST 2013
Author: spyffe
Date: Wed Feb 20 19:04:23 2013
New Revision: 175700
URL: http://llvm.org/viewvc/llvm-project?rev=175700&view=rev
Log:
Fixed a bug where certain vector code didn't
work on i386. Now we let the JIT emit SSE/SSE2
instructions on i386.
<rdar://problem/13240476>
Modified:
lldb/trunk/source/Expression/ClangExpressionParser.cpp
Modified: lldb/trunk/source/Expression/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionParser.cpp?rev=175700&r1=175699&r2=175700&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionParser.cpp Wed Feb 20 19:04:23 2013
@@ -240,6 +240,13 @@ ClangExpressionParser::ClangExpressionPa
m_compiler->getTargetOpts().Triple = llvm::sys::getDefaultTargetTriple();
}
+ if (target_sp->GetArchitecture().GetMachine() == llvm::Triple::x86 ||
+ target_sp->GetArchitecture().GetMachine() == llvm::Triple::x86_64)
+ {
+ m_compiler->getTargetOpts().Features.push_back("+sse");
+ m_compiler->getTargetOpts().Features.push_back("+sse2");
+ }
+
if (m_compiler->getTargetOpts().Triple.find("ios") != std::string::npos)
m_compiler->getTargetOpts().ABI = "apcs-gnu";
@@ -620,6 +627,9 @@ ClangExpressionParser::PrepareForExecuti
StringRef mCPU;
SmallVector<std::string, 0> mAttrs;
+ for (std::string &feature : m_compiler->getTargetOpts().Features)
+ mAttrs.push_back(feature);
+
TargetMachine *target_machine = builder.selectTarget(triple,
mArch,
mCPU,
More information about the lldb-commits
mailing list