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

Unified Diff: runtime/vm/stub_code_x64.cc

Issue 59073012: Temporary fix for Bug 14790 Use EnterStubFrameWithPP for breakpoint handler stubs that have result … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_x64.cc
===================================================================
--- runtime/vm/stub_code_x64.cc (revision 30018)
+++ runtime/vm/stub_code_x64.cc (working copy)
@@ -453,6 +453,7 @@
// require allocation.
__ EnterStubFrame();
if (preserve_result) {
+ __ pushq(Immediate(0)); // Workaround for dropped stack slot during GC.
__ pushq(RBX); // Preserve result, it will be GC-d here.
}
__ pushq(Immediate(Smi::RawValue(0))); // Space for the result.
@@ -463,6 +464,7 @@
__ SmiUntag(RBX);
if (preserve_result) {
__ popq(RAX); // Restore result.
+ __ Drop(1); // Workaround for dropped stack slot during GC.
}
__ LeaveFrame();
@@ -1820,7 +1822,7 @@
// RBX, R10: May contain arguments to runtime stub.
// TOS(0): return address (Dart code).
void StubCode::GenerateBreakpointRuntimeStub(Assembler* assembler) {
- __ EnterStubFrame();
+ __ EnterStubFrameWithPP();
// Preserve runtime args.
__ pushq(RBX);
__ pushq(R10);
@@ -1832,7 +1834,7 @@
__ popq(RAX); // Address of original.
__ popq(R10); // Restore arguments.
__ popq(RBX);
- __ LeaveFrame();
+ __ LeaveFrameWithPP();
__ jmp(RAX); // Jump to original stub.
}
@@ -1861,11 +1863,11 @@
// TOS(0): return address (Dart code).
void StubCode::GenerateBreakpointReturnStub(Assembler* assembler) {
- __ EnterStubFrame();
+ __ EnterStubFrameWithPP();
__ pushq(RAX);
__ CallRuntime(kBreakpointReturnHandlerRuntimeEntry, 0);
__ popq(RAX);
- __ LeaveFrame();
+ __ LeaveFrameWithPP();
__ popq(R11); // discard return address of call to this stub.
__ LeaveFrameWithPP();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698