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

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: clrex and assembler tests 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
« no previous file with comments | « 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 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_.
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698