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

Side by Side Diff: runtime/vm/assembler_mips.cc

Issue 17868006: Fix code for store buffer update on ARM and MIPS (link register was trashed). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/intrinsifier_arm.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) 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/runtime_entry.h" 9 #include "vm/runtime_entry.h"
10 #include "vm/simulator.h" 10 #include "vm/simulator.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 bool can_value_be_smi) { 257 bool can_value_be_smi) {
258 ASSERT(object != value); 258 ASSERT(object != value);
259 sw(value, dest); 259 sw(value, dest);
260 Label done; 260 Label done;
261 if (can_value_be_smi) { 261 if (can_value_be_smi) {
262 StoreIntoObjectFilter(object, value, &done); 262 StoreIntoObjectFilter(object, value, &done);
263 } else { 263 } else {
264 StoreIntoObjectFilterNoSmi(object, value, &done); 264 StoreIntoObjectFilterNoSmi(object, value, &done);
265 } 265 }
266 // A store buffer update is required. 266 // A store buffer update is required.
267 if (value != T0) Push(T0); // Preserve T0. 267 if (value != T0) {
268 // Preserve T0.
269 addiu(SP, SP, Immediate(-2 * kWordSize));
270 sw(T0, Address(SP, 1 * kWordSize));
271 } else {
272 addiu(SP, SP, Immediate(-1 * kWordSize));
273 }
274 sw(RA, Address(SP, 0 * kWordSize));
268 if (object != T0) { 275 if (object != T0) {
269 mov(T0, object); 276 mov(T0, object);
270 } 277 }
271 BranchLink(&StubCode::UpdateStoreBufferLabel()); 278 BranchLink(&StubCode::UpdateStoreBufferLabel());
272 if (value != T0) Pop(T0); // Restore T0. 279 lw(RA, Address(SP, 0 * kWordSize));
280 if (value != T0) {
281 // Restore T0.
282 lw(T0, Address(SP, 1 * kWordSize));
283 addiu(SP, SP, Immediate(2 * kWordSize));
284 } else {
285 addiu(SP, SP, Immediate(1 * kWordSize));
286 }
273 Bind(&done); 287 Bind(&done);
274 } 288 }
275 289
276 290
277 void Assembler::StoreIntoObjectNoBarrier(Register object, 291 void Assembler::StoreIntoObjectNoBarrier(Register object,
278 const Address& dest, 292 const Address& dest,
279 Register value) { 293 Register value) {
280 sw(value, dest); 294 sw(value, dest);
281 #if defined(DEBUG) 295 #if defined(DEBUG)
282 Label done; 296 Label done;
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 Bind(&msg); 677 Bind(&msg);
664 break_(Instr::kMsgMessageCode); 678 break_(Instr::kMsgMessageCode);
665 } 679 }
666 #endif 680 #endif
667 } 681 }
668 682
669 } // namespace dart 683 } // namespace dart
670 684
671 #endif // defined TARGET_ARCH_MIPS 685 #endif // defined TARGET_ARCH_MIPS
672 686
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698