summaryrefslogtreecommitdiffstats
path: root/runtime/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/arch/x86')
-rw-r--r--runtime/arch/x86/context_x86.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/arch/x86/context_x86.cc b/runtime/arch/x86/context_x86.cc
index 37049cf..a7beaa9 100644
--- a/runtime/arch/x86/context_x86.cc
+++ b/runtime/arch/x86/context_x86.cc
@@ -81,7 +81,7 @@ void X86Context::DoLongJump() {
gprs[kNumberOfCpuRegisters - i - 1] = gprs_[i] != nullptr ? *gprs_[i] : X86Context::kBadGprBase + i;
}
// We want to load the stack pointer one slot below so that the ret will pop eip.
- uintptr_t esp = gprs[kNumberOfCpuRegisters - ESP - 1] - kWordSize;
+ uintptr_t esp = gprs[kNumberOfCpuRegisters - ESP - 1] - sizeof(intptr_t);
gprs[kNumberOfCpuRegisters] = esp;
*(reinterpret_cast<uintptr_t*>(esp)) = eip_;
__asm__ __volatile__(