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

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: 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/simulator_mips.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm64.cc
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index e7d7f4f3eb8b696f3978dbf06e6af7aa8149436f..61c3a4bb7776897038f7b5573a53c79b13292cf9 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -1039,8 +1039,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_.
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698