summaryrefslogtreecommitdiff
path: root/compiler/optimizing/jit_patches_arm64.cc
diff options
context:
space:
mode:
author Almaz Mingaleev <mingaleev@google.com> 2024-11-06 12:42:18 +0000
committer Almaz Mingaleev <mingaleev@google.com> 2024-11-06 15:08:37 +0000
commita687066b7043dbc1be8f85001eeb0f341cd25885 (patch)
tree4a718fe531d822ab7b065b62549fdaff7d0ffcde /compiler/optimizing/jit_patches_arm64.cc
parent6b32080cb3f09c786128043df88e53fb344b7a15 (diff)
arm64: Store resolved MethodType-s in .bss.
Bug: 297147201 Test: art/test/testrunner/testrunner.py --target --64 --jit Test: art/test/testrunner/testrunner.py --target --64 Change-Id: Iecd5575e5eb0d161cbc338f63f29cb52b0c23177
Diffstat (limited to 'compiler/optimizing/jit_patches_arm64.cc')
-rw-r--r--compiler/optimizing/jit_patches_arm64.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler/optimizing/jit_patches_arm64.cc b/compiler/optimizing/jit_patches_arm64.cc
index 76ba182acb..193e913945 100644
--- a/compiler/optimizing/jit_patches_arm64.cc
+++ b/compiler/optimizing/jit_patches_arm64.cc
@@ -67,6 +67,12 @@ void JitPatchesARM64::EmitJitRootPatches(
uint64_t index_in_table = code_generation_data.GetJitClassRootIndex(type_reference);
PatchJitRootUse(code, roots_data, table_entry_literal, index_in_table);
}
+ for (const auto& entry : jit_method_type_patches_) {
+ const ProtoReference& proto_reference = entry.first;
+ vixl::aarch64::Literal<uint32_t>* table_entry_literal = entry.second;
+ uint64_t index_in_table = code_generation_data.GetJitMethodTypeRootIndex(proto_reference);
+ PatchJitRootUse(code, roots_data, table_entry_literal, index_in_table);
+ }
}
vixl::aarch64::Literal<uint32_t>* JitPatchesARM64::DeduplicateBootImageAddressLiteral(
@@ -100,5 +106,18 @@ vixl::aarch64::Literal<uint32_t>* JitPatchesARM64::DeduplicateJitClassLiteral(
});
}
+vixl::aarch64::Literal<uint32_t>* JitPatchesARM64::DeduplicateJitMethodTypeLiteral(
+ const DexFile& dex_file,
+ dex::ProtoIndex proto_index,
+ Handle<mirror::MethodType> handle,
+ CodeGenerationData* code_generation_data) {
+ code_generation_data->ReserveJitMethodTypeRoot(ProtoReference(&dex_file, proto_index), handle);
+ return jit_method_type_patches_.GetOrCreate(
+ ProtoReference(&dex_file, proto_index),
+ [this]() {
+ return GetVIXLAssembler()->CreateLiteralDestroyedWithPool<uint32_t>(/* value= */ 0u);
+ });
+}
+
} // namespace arm64
} // namespace art