Fix saved %esp value in up_saveusercontext() for qemu-i486

This commit is contained in:
Nakamura, Yuuichi 2020-04-18 10:44:37 +09:00 committed by Xiang Xiao
parent 0e9b0d7603
commit 00049aa482

View File

@ -132,16 +132,16 @@ up_saveusercontext:
* EIP * EIP
* CS ... * CS ...
* EFLAGS EIP * EFLAGS EIP
* -> ESP CS * ESP CS
* ESP->Return address SS EFLAGS * ESP->Return address SS EFLAGS
* Argument Argument Argument * Argument -> Argument Argument
* *
* NOTE: We don't yet know the value for REG_ESP! That depends upon * NOTE: We don't yet know the value for REG_ESP! That depends upon
* if a priority change occurs or not. * if a priority change occurs or not.
*/ */
leal -4(%esp), %ecx leal 4(%esp), %ecx
movl %ecx, (4*REG_SP)(%eax) movl %ecx, (4*REG_SP)(%eax)
/* Fetch the PC from the stack and save it in the save block */ /* Fetch the PC from the stack and save it in the save block */