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

Unified Diff: runtime/vm/stub_code_arm64.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
Index: runtime/vm/stub_code_arm64.cc
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index c0648d464a297868340cdfabdee99f5682e5c3b9..c69c9e5a2ede295e753ee720711c0a2651b120c4 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -1040,8 +1040,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_.

Powered by Google App Engine
This is Rietveld 408576698