Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Unified Diff: runtime/vm/stub_code_mips.cc

Issue 1722013002: Enable concurrent sweep on MIPS and ARM64. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« runtime/vm/simulator_arm64.cc ('K') | « runtime/vm/stub_code_arm64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_.
« runtime/vm/simulator_arm64.cc ('K') | « runtime/vm/stub_code_arm64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698