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

Unified Diff: vm/code_generator_x64.cc

Issue 10262033: Fix stack pointer reset bug in entry to catch blocks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | « vm/code_generator_ia32.cc ('k') | vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/code_generator_x64.cc
===================================================================
--- vm/code_generator_x64.cc (revision 7165)
+++ vm/code_generator_x64.cc (working copy)
@@ -2582,8 +2582,11 @@
// Restore RSP from RBP as we are coming from a throw and the code for
// popping arguments has not been run.
ASSERT(locals_space_size() >= 0);
- __ movq(RSP, RBP);
- __ subq(RSP, Immediate(locals_space_size()));
+ if (locals_space_size() == 0) {
+ __ movq(RSP, RBP);
+ } else {
+ __ leaq(RSP, Address(RBP, -locals_space_size()));
+ }
// The JumpToExceptionHandler trampoline code sets up
// - the exception object in RAX (kExceptionObjectReg)
« no previous file with comments | « vm/code_generator_ia32.cc ('k') | vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698