diff options
author | 2025-03-24 07:43:12 -0700 | |
---|---|---|
committer | 2025-03-24 07:43:12 -0700 | |
commit | 0c73730c543a6cd0bd8eb87f51eba2b87ffd735d (patch) | |
tree | 880e82fad39e10326c9aa6478562d96453dbd21f | |
parent | 33e281d73cc1c09f1e8452df40cf53052ce814f8 (diff) | |
parent | abf032d28d6ee925386379369403b364fbcb0d34 (diff) |
Fix two issues in fast baseline compiler. am: abf032d28d
Original change: https://android-review.googlesource.com/c/platform/art/+/3557624
Change-Id: I5a693e682ec4f5190ab8a88263e53d60859aeb61
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | compiler/optimizing/fast_compiler_arm64.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/optimizing/fast_compiler_arm64.cc b/compiler/optimizing/fast_compiler_arm64.cc index 027d114f6d..a820fc9422 100644 --- a/compiler/optimizing/fast_compiler_arm64.cc +++ b/compiler/optimizing/fast_compiler_arm64.cc @@ -1034,6 +1034,7 @@ bool FastCompilerARM64::BuildNewInstance(uint32_t vreg, entrypoint = kQuickAllocObjectWithChecks; } InvokeRuntime(entrypoint, dex_pc); + __ Dmb(InnerShareable, BarrierWrites); if (!MoveLocation(CreateNewRegisterLocation(vreg, DataType::Type::kReference, next), calling_convention.GetReturnLocation(DataType::Type::kReference), DataType::Type::kReference)) { @@ -1871,6 +1872,8 @@ bool FastCompilerARM64::ProcessDexInstruction(const Instruction& instruction, return true; case Instruction::IGET_OBJECT: + is_object = true; + FALLTHROUGH_INTENDED; case Instruction::IGET: case Instruction::IGET_WIDE: case Instruction::IGET_BOOLEAN: @@ -1896,8 +1899,9 @@ bool FastCompilerARM64::ProcessDexInstruction(const Instruction& instruction, } } - if (can_receiver_be_null) { - // We need a frame in case the null check throws. + if (can_receiver_be_null || is_object) { + // We need a frame in case the null check throws or there is a read + // barrier. if (!EnsureHasFrame()) { return false; } @@ -1910,11 +1914,7 @@ bool FastCompilerARM64::ProcessDexInstruction(const Instruction& instruction, if (HitUnimplemented()) { return false; } - if (instruction.Opcode() == Instruction::IGET_OBJECT) { - // Generate a frame because of the read barrier. - if (!EnsureHasFrame()) { - return false; - } + if (is_object) { Register dst = WRegisterFrom( CreateNewRegisterLocation(source_or_dest_reg, DataType::Type::kReference, next)); if (HitUnimplemented()) { |