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

Unified 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, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_mips.cc
===================================================================
--- runtime/vm/assembler_mips.cc (revision 24492)
+++ runtime/vm/assembler_mips.cc (working copy)
@@ -264,12 +264,26 @@
StoreIntoObjectFilterNoSmi(object, value, &done);
}
// A store buffer update is required.
- if (value != T0) Push(T0); // Preserve T0.
+ if (value != T0) {
+ // Preserve T0.
+ addiu(SP, SP, Immediate(-2 * kWordSize));
+ sw(T0, Address(SP, 1 * kWordSize));
+ } else {
+ addiu(SP, SP, Immediate(-1 * kWordSize));
+ }
+ sw(RA, Address(SP, 0 * kWordSize));
if (object != T0) {
mov(T0, object);
}
BranchLink(&StubCode::UpdateStoreBufferLabel());
- if (value != T0) Pop(T0); // Restore T0.
+ lw(RA, Address(SP, 0 * kWordSize));
+ if (value != T0) {
+ // Restore T0.
+ lw(T0, Address(SP, 1 * kWordSize));
+ addiu(SP, SP, Immediate(2 * kWordSize));
+ } else {
+ addiu(SP, SP, Immediate(1 * kWordSize));
+ }
Bind(&done);
}
« 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