Clarify allocation entry point semantics
Test: Treehugger
Bug: 171993478
Change-Id: I03a95b7028ef98a5438011ce53b43de44f23bec8
diff --git a/compiler/optimizing/intrinsics_arm64.cc b/compiler/optimizing/intrinsics_arm64.cc
index fb72fcf..20488f9 100644
--- a/compiler/optimizing/intrinsics_arm64.cc
+++ b/compiler/optimizing/intrinsics_arm64.cc
@@ -3119,7 +3119,7 @@
allocate_instance();
__ Mov(temp.W(), value);
__ Str(temp.W(), HeapOperand(out.W(), info.value_offset));
- // `value` is a final field, emit the barrier after we have stored it.
+ // Class pointer and `value` final field stores require a barrier before publication.
codegen_->GenerateMemoryBarrier(MemBarrierKind::kStoreStore);
}
} else {
@@ -3141,7 +3141,7 @@
// Otherwise allocate and initialize a new j.l.Integer.
allocate_instance();
__ Str(in.W(), HeapOperand(out.W(), info.value_offset));
- // `value` is a final field, emit the barrier after we have stored it.
+ // Class pointer and `value` final field stores require a barrier before publication.
codegen_->GenerateMemoryBarrier(MemBarrierKind::kStoreStore);
__ Bind(&done);
}