Index: runtime/vm/simulator_arm.cc |
diff --git a/runtime/vm/simulator_arm.cc b/runtime/vm/simulator_arm.cc |
index d9c439c9c4680a36c42ae108c838ed7314269d3a..9c3e3cf36a305ad121d795177541e26945b6c66d 100644 |
--- a/runtime/vm/simulator_arm.cc |
+++ b/runtime/vm/simulator_arm.cc |
@@ -3877,7 +3877,6 @@ int64_t Simulator::Call(int32_t entry, |
void Simulator::Longjmp(uword pc, |
uword sp, |
uword fp, |
- uword pp, |
RawObject* raw_exception, |
RawObject* raw_stacktrace, |
Thread* thread) { |
@@ -3898,7 +3897,6 @@ void Simulator::Longjmp(uword pc, |
set_register(PC, static_cast<int32_t>(pc)); |
set_register(SP, static_cast<int32_t>(sp)); |
set_register(FP, static_cast<int32_t>(fp)); |
- set_register(PP, static_cast<int32_t>(pp)); |
set_register(THR, reinterpret_cast<uword>(thread)); |
// Set the tag. |
thread->set_vm_tag(VMTag::kDartTagId); |
@@ -3908,6 +3906,13 @@ void Simulator::Longjmp(uword pc, |
ASSERT(raw_exception != Object::null()); |
set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
+ // Restore pool pointer. |
+ int32_t code = *reinterpret_cast<int32_t*>( |
+ fp + kPcMarkerSlotFromFp * kWordSize); |
+ int32_t pp = *reinterpret_cast<int32_t*>( |
+ code + Code::object_pool_offset() - kHeapObjectTag); |
+ set_register(CODE_REG, code); |
+ set_register(PP, pp); |
buf->Longjmp(); |
} |