| Index: runtime/vm/stub_code_mips.cc
|
| diff --git a/runtime/vm/stub_code_mips.cc b/runtime/vm/stub_code_mips.cc
|
| index 8d1b252e99fc9d00f26243d707c6fa5544d4c985..9b8e79df2f14c30264a05000876f4bd914af4987 100644
|
| --- a/runtime/vm/stub_code_mips.cc
|
| +++ b/runtime/vm/stub_code_mips.cc
|
| @@ -1066,8 +1066,14 @@ void StubCode::GenerateUpdateStoreBufferStub(Assembler* assembler) {
|
| __ Ret();
|
|
|
| __ Bind(&add_to_buffer);
|
| + // Atomically set the remembered bit of the object header.
|
| + Label retry;
|
| + __ Bind(&retry);
|
| + __ ll(T2, FieldAddress(T0, Object::tags_offset()));
|
| __ ori(T2, T2, Immediate(1 << RawObject::kRememberedBit));
|
| - __ sw(T2, FieldAddress(T0, Object::tags_offset()));
|
| + __ sc(T2, FieldAddress(T0, Object::tags_offset()));
|
| + // T2 = 1 on success, 0 on failure.
|
| + __ beq(T2, ZR, &retry);
|
|
|
| // Load the StoreBuffer block out of the thread. Then load top_ out of the
|
| // StoreBufferBlock and add the address to the pointers_.
|
|
|