diff options
Diffstat (limited to 'compiler/optimizing/intrinsics_x86.cc')
-rw-r--r-- | compiler/optimizing/intrinsics_x86.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler/optimizing/intrinsics_x86.cc b/compiler/optimizing/intrinsics_x86.cc index 5986a2f3a0..b21f36cfcf 100644 --- a/compiler/optimizing/intrinsics_x86.cc +++ b/compiler/optimizing/intrinsics_x86.cc @@ -2023,11 +2023,11 @@ static void GenUnsafePut(LocationSummary* locations, if (type == DataType::Type::kReference) { bool value_can_be_null = true; // TODO: Worth finding out this information? - codegen->MarkGCCard(locations->GetTemp(0).AsRegister<Register>(), - locations->GetTemp(1).AsRegister<Register>(), - base, - value_loc.AsRegister<Register>(), - value_can_be_null); + codegen->MaybeMarkGCCard(locations->GetTemp(0).AsRegister<Register>(), + locations->GetTemp(1).AsRegister<Register>(), + base, + value_loc.AsRegister<Register>(), + value_can_be_null); } } @@ -2363,7 +2363,7 @@ static void GenReferenceCAS(HInvoke* invoke, bool value_can_be_null = true; // TODO: Worth finding out this information? NearLabel skip_mark_gc_card; __ j(kNotZero, &skip_mark_gc_card); - codegen->MarkGCCard(temp, temp2, base, value, value_can_be_null); + codegen->MaybeMarkGCCard(temp, temp2, base, value, value_can_be_null); __ Bind(&skip_mark_gc_card); // If heap poisoning is enabled, we need to unpoison the values @@ -2629,7 +2629,7 @@ static void GenUnsafeGetAndUpdate(HInvoke* invoke, // Mark card for object as a new value shall be stored. bool new_value_can_be_null = true; // TODO: Worth finding out this information? DCHECK_EQ(temp2, ECX); // Byte register for `MarkGCCard()`. - codegen->MarkGCCard(temp1, temp2, base, /*value=*/ out_reg, new_value_can_be_null); + codegen->MaybeMarkGCCard(temp1, temp2, base, /*value=*/out_reg, new_value_can_be_null); if (kPoisonHeapReferences) { // Use a temp to avoid poisoning base of the field address, which might happen if `out` @@ -3357,7 +3357,7 @@ void IntrinsicCodeGeneratorX86::VisitSystemArrayCopy(HInvoke* invoke) { } // We only need one card marking on the destination array. - codegen_->MarkGCCard(temp1, temp3, dest, Register(kNoRegister), /* emit_null_check= */ false); + codegen_->MarkGCCard(temp1, temp3, dest); __ Bind(&skip_copy_and_write_barrier); } @@ -4176,7 +4176,8 @@ static void GenerateVarHandleSet(HInvoke* invoke, CodeGeneratorX86* codegen) { is_volatile, /* value_can_be_null */ true, // Value can be null, and this write barrier is not being relied on for other sets. - WriteBarrierKind::kEmitWithNullCheck); + value_type == DataType::Type::kReference ? WriteBarrierKind::kEmitNotBeingReliedOn : + WriteBarrierKind::kDontEmit); __ Bind(slow_path->GetExitLabel()); } @@ -4336,8 +4337,7 @@ static void GenerateVarHandleGetAndSet(HInvoke* invoke, CodeGeneratorX86* codege /* always_update_field= */ true, &temp2); } - codegen->MarkGCCard( - temp, temp2, reference, value.AsRegister<Register>(), /* emit_null_check= */ false); + codegen->MarkGCCard(temp, temp2, reference); if (kPoisonHeapReferences) { __ movl(temp, value.AsRegister<Register>()); __ PoisonHeapReference(temp); |