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

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