| Index: runtime/vm/stub_code_arm64.cc
|
| diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
|
| index e7d7f4f3eb8b696f3978dbf06e6af7aa8149436f..61c3a4bb7776897038f7b5573a53c79b13292cf9 100644
|
| --- a/runtime/vm/stub_code_arm64.cc
|
| +++ b/runtime/vm/stub_code_arm64.cc
|
| @@ -1039,8 +1039,17 @@ void StubCode::GenerateUpdateStoreBufferStub(Assembler* assembler) {
|
| __ Push(R2);
|
| __ Push(R3);
|
|
|
| - __ orri(R2, TMP, Immediate(1 << RawObject::kRememberedBit));
|
| - __ StoreFieldToOffset(R2, R0, Object::tags_offset());
|
| + // Atomically set the remembered bit of the object header.
|
| + ASSERT(Object::tags_offset() == 0);
|
| + __ sub(R3, R0, Operand(kHeapObjectTag));
|
| + // R3: Untagged address of header word (ldxr/stxr do not support offsets).
|
| + Label retry;
|
| + __ Bind(&retry);
|
| + __ ldxr(R2, R3);
|
| + __ orri(R2, R2, Immediate(1 << RawObject::kRememberedBit));
|
| + __ stxr(R1, R2, R3);
|
| + __ cmp(R1, Operand(1));
|
| + __ b(&retry, EQ);
|
|
|
| // Load the StoreBuffer block out of the thread. Then load top_ out of the
|
| // StoreBufferBlock and add the address to the pointers_.
|
|
|