diff options
author | 2014-08-01 19:04:18 +0100 | |
---|---|---|
committer | 2014-09-25 18:56:34 +0100 | |
commit | f4da675bbc4615c5f854c81964cac9dd1153baea (patch) | |
tree | ea78bafc7ee543e11e7bd824ab40d5f5f3d82f9d /compiler/compiled_method.cc | |
parent | f2476d524281c6d649f5deb6d1ccccc92380c1ed (diff) |
Implement method calls using relative BL on ARM.
Store the linker patches with each CompiledMethod instead of
keeping them in CompilerDriver. Reorganize oat file creation
to apply the patches as we're writing the method code. Add
framework for platform-specific relative call patches in the
OatWriter. Implement relative call patches for ARM.
Change-Id: Ie2effb3d92b61ac8f356140eba09dc37d62290f8
Diffstat (limited to 'compiler/compiled_method.cc')
-rw-r--r-- | compiler/compiled_method.cc | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/compiler/compiled_method.cc b/compiler/compiled_method.cc index ba5bd30b01..698bf3b670 100644 --- a/compiler/compiled_method.cc +++ b/compiler/compiled_method.cc @@ -152,14 +152,16 @@ CompiledMethod::CompiledMethod(CompilerDriver* driver, const std::vector<uint8_t>& mapping_table, const std::vector<uint8_t>& vmap_table, const std::vector<uint8_t>& native_gc_map, - const std::vector<uint8_t>* cfi_info) + const std::vector<uint8_t>* cfi_info, + const ArrayRef<LinkerPatch>& patches) : CompiledCode(driver, instruction_set, quick_code), frame_size_in_bytes_(frame_size_in_bytes), core_spill_mask_(core_spill_mask), fp_spill_mask_(fp_spill_mask), src_mapping_table_(driver->DeduplicateSrcMappingTable(src_mapping_table->Arrange())), mapping_table_(driver->DeduplicateMappingTable(mapping_table)), vmap_table_(driver->DeduplicateVMapTable(vmap_table)), gc_map_(driver->DeduplicateGCMap(native_gc_map)), - cfi_info_(driver->DeduplicateCFIInfo(cfi_info)) { + cfi_info_(driver->DeduplicateCFIInfo(cfi_info)), + patches_(patches.begin(), patches.end()) { } CompiledMethod::CompiledMethod(CompilerDriver* driver, @@ -178,7 +180,8 @@ CompiledMethod::CompiledMethod(CompilerDriver* driver, mapping_table_(driver->DeduplicateMappingTable(mapping_table)), vmap_table_(driver->DeduplicateVMapTable(stack_map)), gc_map_(nullptr), - cfi_info_(nullptr) { + cfi_info_(nullptr), + patches_() { } CompiledMethod::CompiledMethod(CompilerDriver* driver, @@ -195,7 +198,8 @@ CompiledMethod::CompiledMethod(CompilerDriver* driver, mapping_table_(driver->DeduplicateMappingTable(std::vector<uint8_t>())), vmap_table_(driver->DeduplicateVMapTable(std::vector<uint8_t>())), gc_map_(driver->DeduplicateGCMap(std::vector<uint8_t>())), - cfi_info_(driver->DeduplicateCFIInfo(cfi_info)) { + cfi_info_(driver->DeduplicateCFIInfo(cfi_info)), + patches_() { } // Constructs a CompiledMethod for the Portable compiler. @@ -208,7 +212,9 @@ CompiledMethod::CompiledMethod(CompilerDriver* driver, InstructionSet instructio src_mapping_table_(driver->DeduplicateSrcMappingTable(SrcMap())), mapping_table_(driver->DeduplicateMappingTable(std::vector<uint8_t>())), vmap_table_(driver->DeduplicateVMapTable(std::vector<uint8_t>())), - gc_map_(driver->DeduplicateGCMap(gc_map)) { + gc_map_(driver->DeduplicateGCMap(gc_map)), + cfi_info_(nullptr), + patches_() { } CompiledMethod::CompiledMethod(CompilerDriver* driver, InstructionSet instruction_set, @@ -219,7 +225,9 @@ CompiledMethod::CompiledMethod(CompilerDriver* driver, InstructionSet instructio src_mapping_table_(driver->DeduplicateSrcMappingTable(SrcMap())), mapping_table_(driver->DeduplicateMappingTable(std::vector<uint8_t>())), vmap_table_(driver->DeduplicateVMapTable(std::vector<uint8_t>())), - gc_map_(driver->DeduplicateGCMap(std::vector<uint8_t>())) { + gc_map_(driver->DeduplicateGCMap(std::vector<uint8_t>())), + cfi_info_(nullptr), + patches_() { } } // namespace art |