diff options
| author | 2012-06-17 03:45:00 -0700 | |
|---|---|---|
| committer | 2012-06-17 03:51:59 -0700 | |
| commit | 53519bf663e185d40a4cdf8b5af67ba34c725fa7 (patch) | |
| tree | 7ad63505088353f8e8302d75933a53ff351136e7 /src/compiler_llvm/compilation_unit.cc | |
| parent | 69c27e04a96f037ee0ec0472c103416d4a4d5850 (diff) | |
Set Target CPU.
Change-Id: I1d80b87421e353c5f4925aaaec0b8301048cd0a6
Diffstat (limited to 'src/compiler_llvm/compilation_unit.cc')
| -rw-r--r-- | src/compiler_llvm/compilation_unit.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler_llvm/compilation_unit.cc b/src/compiler_llvm/compilation_unit.cc index 5dc03c361e..38faf618cf 100644 --- a/src/compiler_llvm/compilation_unit.cc +++ b/src/compiler_llvm/compilation_unit.cc @@ -252,16 +252,20 @@ void CompilationUnit::UpdateFrameSizeInBytes(const llvm::Function* func, bool CompilationUnit::MaterializeToFile(llvm::raw_ostream& out_stream) { // Lookup the LLVM target char const* target_triple = NULL; + char const* target_cpu = ""; char const* target_attr = NULL; switch (insn_set_) { case kThumb2: target_triple = "thumb-none-linux-gnueabi"; + target_cpu = "cortex-a9"; target_attr = "+thumb2,+neon,+neonfp,+vfp3,+db"; break; case kArm: target_triple = "armv7-none-linux-gnueabi"; + // TODO: Fix for Nexus S. + target_cpu = "cortex-a9"; // TODO: Fix for Xoom. target_attr = "+v7,+neon,+neonfp,+vfp3,+db"; break; @@ -296,7 +300,7 @@ bool CompilationUnit::MaterializeToFile(llvm::raw_ostream& out_stream) { // Create the llvm::TargetMachine llvm::OwningPtr<llvm::TargetMachine> target_machine( - target->createTargetMachine(target_triple, "", target_attr, target_options, + target->createTargetMachine(target_triple, target_cpu, target_attr, target_options, llvm::Reloc::Static, llvm::CodeModel::Small, llvm::CodeGenOpt::Aggressive)); |