| Index: runtime/vm/stub_code_mips.cc
|
| diff --git a/runtime/vm/stub_code_mips.cc b/runtime/vm/stub_code_mips.cc
|
| index bc529678cebb934650b0a7528c73362edf4bbeda..b4965c3363d5d2da0075e5e22de1eea338460867 100644
|
| --- a/runtime/vm/stub_code_mips.cc
|
| +++ b/runtime/vm/stub_code_mips.cc
|
| @@ -1065,8 +1065,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_.
|
|
|