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

Side by Side 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, 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
« runtime/vm/simulator_arm64.cc ('K') | « runtime/vm/stub_code_arm64.cc ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 __ lw(T2, FieldAddress(T0, Object::tags_offset())); 1059 __ lw(T2, FieldAddress(T0, Object::tags_offset()));
1060 __ andi(CMPRES1, T2, Immediate(1 << RawObject::kRememberedBit)); 1060 __ andi(CMPRES1, T2, Immediate(1 << RawObject::kRememberedBit));
1061 __ beq(CMPRES1, ZR, &add_to_buffer); 1061 __ beq(CMPRES1, ZR, &add_to_buffer);
1062 __ lw(T1, Address(SP, 0 * kWordSize)); 1062 __ lw(T1, Address(SP, 0 * kWordSize));
1063 __ lw(T2, Address(SP, 1 * kWordSize)); 1063 __ lw(T2, Address(SP, 1 * kWordSize));
1064 __ lw(T3, Address(SP, 2 * kWordSize)); 1064 __ lw(T3, Address(SP, 2 * kWordSize));
1065 __ addiu(SP, SP, Immediate(3 * kWordSize)); 1065 __ addiu(SP, SP, Immediate(3 * kWordSize));
1066 __ Ret(); 1066 __ Ret();
1067 1067
1068 __ Bind(&add_to_buffer); 1068 __ Bind(&add_to_buffer);
1069 // Atomically set the remembered bit of the object header.
1070 Label retry;
1071 __ Bind(&retry);
1072 __ ll(T2, FieldAddress(T0, Object::tags_offset()));
1069 __ ori(T2, T2, Immediate(1 << RawObject::kRememberedBit)); 1073 __ ori(T2, T2, Immediate(1 << RawObject::kRememberedBit));
1070 __ sw(T2, FieldAddress(T0, Object::tags_offset())); 1074 __ sc(T2, FieldAddress(T0, Object::tags_offset()));
1075 // T2 = 1 on success, 0 on failure.
1076 __ beq(T2, ZR, &retry);
1071 1077
1072 // Load the StoreBuffer block out of the thread. Then load top_ out of the 1078 // Load the StoreBuffer block out of the thread. Then load top_ out of the
1073 // StoreBufferBlock and add the address to the pointers_. 1079 // StoreBufferBlock and add the address to the pointers_.
1074 __ lw(T1, Address(THR, Thread::store_buffer_block_offset())); 1080 __ lw(T1, Address(THR, Thread::store_buffer_block_offset()));
1075 __ lw(T2, Address(T1, StoreBufferBlock::top_offset())); 1081 __ lw(T2, Address(T1, StoreBufferBlock::top_offset()));
1076 __ sll(T3, T2, 2); 1082 __ sll(T3, T2, 2);
1077 __ addu(T3, T1, T3); 1083 __ addu(T3, T1, T3);
1078 __ sw(T0, Address(T3, StoreBufferBlock::pointers_offset())); 1084 __ sw(T0, Address(T3, StoreBufferBlock::pointers_offset()));
1079 1085
1080 // Increment top_ and check for overflow. 1086 // Increment top_ and check for overflow.
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
2302 __ Bind(&miss); 2308 __ Bind(&miss);
2303 __ LoadIsolate(T2); 2309 __ LoadIsolate(T2);
2304 __ lw(CODE_REG, Address(T2, Isolate::ic_miss_code_offset())); 2310 __ lw(CODE_REG, Address(T2, Isolate::ic_miss_code_offset()));
2305 __ lw(T1, FieldAddress(CODE_REG, Code::entry_point_offset())); 2311 __ lw(T1, FieldAddress(CODE_REG, Code::entry_point_offset()));
2306 __ Ret(); 2312 __ Ret();
2307 } 2313 }
2308 2314
2309 } // namespace dart 2315 } // namespace dart
2310 2316
2311 #endif // defined TARGET_ARCH_MIPS 2317 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« 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