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

Side by Side Diff: runtime/vm/assembler_arm.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 | « no previous file | runtime/vm/assembler_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) 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_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/simulator.h" 9 #include "vm/simulator.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after
1368 bool can_value_be_smi) { 1368 bool can_value_be_smi) {
1369 ASSERT(object != value); 1369 ASSERT(object != value);
1370 str(value, dest); 1370 str(value, dest);
1371 Label done; 1371 Label done;
1372 if (can_value_be_smi) { 1372 if (can_value_be_smi) {
1373 StoreIntoObjectFilter(object, value, &done); 1373 StoreIntoObjectFilter(object, value, &done);
1374 } else { 1374 } else {
1375 StoreIntoObjectFilterNoSmi(object, value, &done); 1375 StoreIntoObjectFilterNoSmi(object, value, &done);
1376 } 1376 }
1377 // A store buffer update is required. 1377 // A store buffer update is required.
1378 if (value != R0) Push(R0); // Preserve R0. 1378 RegList regs = (1 << LR);
1379 if (value != R0) {
1380 regs |= (1 << R0); // Preserve R0.
1381 }
1382 PushList(regs);
1379 if (object != R0) { 1383 if (object != R0) {
1380 mov(R0, ShifterOperand(object)); 1384 mov(R0, ShifterOperand(object));
1381 } 1385 }
1382 BranchLink(&StubCode::UpdateStoreBufferLabel()); 1386 BranchLink(&StubCode::UpdateStoreBufferLabel());
1383 if (value != R0) Pop(R0); // Restore R0. 1387 PopList(regs);
1384 Bind(&done); 1388 Bind(&done);
1385 } 1389 }
1386 1390
1387 1391
1388 void Assembler::StoreIntoObjectNoBarrier(Register object, 1392 void Assembler::StoreIntoObjectNoBarrier(Register object,
1389 const Address& dest, 1393 const Address& dest,
1390 Register value) { 1394 Register value) {
1391 str(value, dest); 1395 str(value, dest);
1392 #if defined(DEBUG) 1396 #if defined(DEBUG)
1393 Label done; 1397 Label done;
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
2205 2209
2206 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2210 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2207 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 2211 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
2208 return fpu_reg_names[reg]; 2212 return fpu_reg_names[reg];
2209 } 2213 }
2210 2214
2211 } // namespace dart 2215 } // namespace dart
2212 2216
2213 #endif // defined TARGET_ARCH_ARM 2217 #endif // defined TARGET_ARCH_ARM
2214 2218
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698