ART: Single-frame deopt
Add deoptimization of a single frame. Works by removing the managed
code frame and jumping into the quick-to-interpreter bridge, and
the bridge understanding a stored ShadowFrame.
We need a separate fixup pass. For x86, we leave the return address
on the stack so we don't need to push it there.
Bug: 21611912
Change-Id: I06625685ced8b054244f8685ab50b238a705b9d2
diff --git a/runtime/arch/x86/context_x86.h b/runtime/arch/x86/context_x86.h
index c4a11d8..59beb12 100644
--- a/runtime/arch/x86/context_x86.h
+++ b/runtime/arch/x86/context_x86.h
@@ -44,6 +44,10 @@
eip_ = new_pc;
}
+ void SetArg0(uintptr_t new_arg0_value) OVERRIDE {
+ SetGPR(EAX, new_arg0_value);
+ }
+
bool IsAccessibleGPR(uint32_t reg) OVERRIDE {
DCHECK_LT(reg, static_cast<uint32_t>(kNumberOfCpuRegisters));
return gprs_[reg] != nullptr;
@@ -95,10 +99,10 @@
// Pointers to register locations. Values are initialized to null or the special registers below.
uintptr_t* gprs_[kNumberOfCpuRegisters];
uint32_t* fprs_[kNumberOfFloatRegisters];
- // Hold values for esp and eip if they are not located within a stack frame. EIP is somewhat
+ // Hold values for esp, eip and arg0 if they are not located within a stack frame. EIP is somewhat
// special in that it cannot be encoded normally as a register operand to an instruction (except
// in 64bit addressing modes).
- uintptr_t esp_, eip_;
+ uintptr_t esp_, eip_, arg0_;
};
} // namespace x86
} // namespace art