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

Unified Diff: runtime/vm/intermediate_language_mips.cc

Issue 14362008: Implement catch on ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_mips.cc
===================================================================
--- runtime/vm/intermediate_language_mips.cc (revision 21707)
+++ runtime/vm/intermediate_language_mips.cc (working copy)
@@ -85,10 +85,12 @@
if (!compiler->HasFinally()) {
Label stack_ok;
__ Comment("Stack Check");
- const int sp_fp_dist = compiler->StackSize() + (-kFirstLocalSlotIndex - 1);
- __ subu(T2, FP, SP);
+ const intptr_t fp_sp_dist =
+ (kFirstLocalSlotIndex + 1 - compiler->StackSize()) * kWordSize;
+ ASSERT(fp_sp_dist <= 0);
+ __ subu(T2, SP, FP);
- __ BranchEqual(T2, sp_fp_dist * kWordSize, &stack_ok);
+ __ BranchEqual(T2, fp_sp_dist, &stack_ok);
__ break_(0);
__ Bind(&stack_ok);
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698