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

Side by Side 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, 9 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 __ tsti(TMP, Immediate(1 << RawObject::kRememberedBit)); 1032 __ tsti(TMP, Immediate(1 << RawObject::kRememberedBit));
1033 __ b(&add_to_buffer, EQ); 1033 __ b(&add_to_buffer, EQ);
1034 __ ret(); 1034 __ ret();
1035 1035
1036 __ Bind(&add_to_buffer); 1036 __ Bind(&add_to_buffer);
1037 // Save values being destroyed. 1037 // Save values being destroyed.
1038 __ Push(R1); 1038 __ Push(R1);
1039 __ Push(R2); 1039 __ Push(R2);
1040 __ Push(R3); 1040 __ Push(R3);
1041 1041
1042 __ orri(R2, TMP, Immediate(1 << RawObject::kRememberedBit)); 1042 // Atomically set the remembered bit of the object header.
1043 __ StoreFieldToOffset(R2, R0, Object::tags_offset()); 1043 ASSERT(Object::tags_offset() == 0);
1044 __ sub(R3, R0, Operand(kHeapObjectTag));
1045 // R3: Untagged address of header word (ldxr/stxr do not support offsets).
1046 Label retry;
1047 __ Bind(&retry);
1048 __ ldxr(R2, R3);
1049 __ orri(R2, R2, Immediate(1 << RawObject::kRememberedBit));
1050 __ stxr(R1, R2, R3);
1051 __ cmp(R1, Operand(1));
1052 __ b(&retry, EQ);
1044 1053
1045 // Load the StoreBuffer block out of the thread. Then load top_ out of the 1054 // Load the StoreBuffer block out of the thread. Then load top_ out of the
1046 // StoreBufferBlock and add the address to the pointers_. 1055 // StoreBufferBlock and add the address to the pointers_.
1047 __ LoadFromOffset(R1, THR, Thread::store_buffer_block_offset()); 1056 __ LoadFromOffset(R1, THR, Thread::store_buffer_block_offset());
1048 __ LoadFromOffset(R2, R1, StoreBufferBlock::top_offset(), kUnsignedWord); 1057 __ LoadFromOffset(R2, R1, StoreBufferBlock::top_offset(), kUnsignedWord);
1049 __ add(R3, R1, Operand(R2, LSL, 3)); 1058 __ add(R3, R1, Operand(R2, LSL, 3));
1050 __ StoreToOffset(R0, R3, StoreBufferBlock::pointers_offset()); 1059 __ StoreToOffset(R0, R3, StoreBufferBlock::pointers_offset());
1051 1060
1052 // Increment top_ and check for overflow. 1061 // Increment top_ and check for overflow.
1053 // R2: top_. 1062 // R2: top_.
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 __ Bind(&miss); 2193 __ Bind(&miss);
2185 __ LoadIsolate(R2); 2194 __ LoadIsolate(R2);
2186 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset())); 2195 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset()));
2187 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset())); 2196 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset()));
2188 __ ret(); 2197 __ ret();
2189 } 2198 }
2190 2199
2191 } // namespace dart 2200 } // namespace dart
2192 2201
2193 #endif // defined TARGET_ARCH_ARM64 2202 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« 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