Index: runtime/vm/stub_code_x64.cc |
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc |
index 6ffe51d8015b01cee486c8834c6e387d9eab23c4..5c4384cafd959efc0bee7d34e740324f64a539c0 100644 |
--- a/runtime/vm/stub_code_x64.cc |
+++ b/runtime/vm/stub_code_x64.cc |
@@ -1841,7 +1841,6 @@ void StubCode::GenerateGetStackPointerStub(Assembler* assembler) { |
// Arg4: exception object |
// Arg5: stacktrace object |
// Arg6: thread |
-// Arg7: pool pointer |
// No Result. |
void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { |
ASSERT(kExceptionObjectReg == RAX); |
@@ -1853,11 +1852,9 @@ void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { |
Register stacktrace_reg = RBX; |
__ movq(stacktrace_reg, Address(RSP, 5 * kWordSize)); |
__ movq(THR, Address(RSP, 6 * kWordSize)); |
- __ movq(PP, Address(RSP, 7 * kWordSize)); |
#else |
Register stacktrace_reg = CallingConventions::kArg5Reg; |
__ movq(THR, CallingConventions::kArg6Reg); |
- __ movq(PP, Address(RSP, 1 * kWordSize)); |
#endif |
__ movq(RBP, CallingConventions::kArg3Reg); |
__ movq(RSP, CallingConventions::kArg2Reg); |
@@ -1868,6 +1865,9 @@ void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { |
// Clear top exit frame. |
__ movq(Address(THR, Thread::top_exit_frame_info_offset()), |
Immediate(0)); |
+ // Restore the pool pointer. |
+ __ RestoreCodePointer(); |
+ __ LoadPoolPointer(PP); |
__ jmp(CallingConventions::kArg1Reg); // Jump to the exception handler code. |
} |