summaryrefslogtreecommitdiff
path: root/compiler/optimizing/jit_patches_arm64.cc
diff options
context:
space:
mode:
author Almaz Mingaleev <mingaleev@google.com> 2024-11-26 10:40:13 +0000
committer Almaz Mingaleev <mingaleev@google.com> 2024-12-09 08:05:53 +0000
commitba201d247dbcf4c30a9c05d29ea51fe8639732e4 (patch)
treeadeceded6df7783b5ec66b3e99be0827ccb29281 /compiler/optimizing/jit_patches_arm64.cc
parent1be926562ae7f1d28f2d4504aee3a0eca9dcba17 (diff)
Revert^2 "arm64: Store resolved MethodType-s in .bss."
This reverts commit fad4678f3ae48d84b7ed1c842b03a023e4f2cb37. Bug: 380651440 bug: 297147201 Test: atest CtsLibcoreOjTestCases on a redfin device flashed Test: with ab/12108082: test crashes w/o WriteBarrier line Test: and passes w/ it. Change-Id: Ibdfc090e3c2b693c1bb3b160a64c9f94448e18ec
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