summaryrefslogtreecommitdiffstats
path: root/compiler/dex
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-04-07 16:09:30 -0700
committerAndreas Gampe <agampe@google.com>2015-04-07 16:43:08 -0700
commit3c54b0023fca579aae006dfa607fb14de5846c42 (patch)
tree7b996231875fdfd54855a9aa86fe2494cdee1ec5 /compiler/dex
parent425ee0e1103b52bb72132df64f503725d1a15300 (diff)
downloadart-3c54b0023fca579aae006dfa607fb14de5846c42.zip
art-3c54b0023fca579aae006dfa607fb14de5846c42.tar.gz
art-3c54b0023fca579aae006dfa607fb14de5846c42.tar.bz2
ART: Fix 64-bit ELF file support
The API wasn't cross-compile-safe, 32-bit patchoat would fail for negative delta applied to a 64-bit ELF file. Add 64-bit ELF file output to the compilers, behind a flag, currently off by default (preserving current behavior). Bug: 20095017 Change-Id: I2cde7b4c7cc83413c76692d7b745868d644a604c
Diffstat (limited to 'compiler/dex')
-rw-r--r--compiler/dex/quick/quick_compiler.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/dex/quick/quick_compiler.cc b/compiler/dex/quick/quick_compiler.cc
index 8baafc7..01652d6 100644
--- a/compiler/dex/quick/quick_compiler.cc
+++ b/compiler/dex/quick/quick_compiler.cc
@@ -798,8 +798,13 @@ bool QuickCompiler::WriteElf(art::File* file,
const std::vector<const art::DexFile*>& dex_files,
const std::string& android_root,
bool is_host) const {
- return art::ElfWriterQuick32::Create(file, oat_writer, dex_files, android_root, is_host,
- *GetCompilerDriver());
+ if (kProduce64BitELFFiles && Is64BitInstructionSet(GetCompilerDriver()->GetInstructionSet())) {
+ return art::ElfWriterQuick64::Create(file, oat_writer, dex_files, android_root, is_host,
+ *GetCompilerDriver());
+ } else {
+ return art::ElfWriterQuick32::Create(file, oat_writer, dex_files, android_root, is_host,
+ *GetCompilerDriver());
+ }
}
Mir2Lir* QuickCompiler::GetCodeGenerator(CompilationUnit* cu, void* compilation_unit) const {