aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@FreeBSD.org>2022-09-02 14:16:35 +0000
committerTijl Coosemans <tijl@FreeBSD.org>2022-09-02 15:02:00 +0000
commit5d45f99a1ed861618d5c4d5b4252d5eba001ad35 (patch)
treed920ee54d13d3038f5be4b2137e714b76b3257ee
parent89d98b9b003e63dfdf182fa3144a3e809019fcd4 (diff)
downloadsrc-5d45f99a1ed861618d5c4d5b4252d5eba001ad35.tar.gz
src-5d45f99a1ed861618d5c4d5b4252d5eba001ad35.zip
i386 doreti: Fix calculation of stack frame size
Reviewed by: kib Fixes: e8b2980e4a12 - i386 doreti: stop saving/restoring %ecx (cherry picked from commit cfdc649e455bc0d37d42c46b59360462e93b4300)
-rw-r--r--sys/i386/i386/exception.s2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s
index 38ec48e66e24..af654fd129a9 100644
--- a/sys/i386/i386/exception.s
+++ b/sys/i386/i386/exception.s
@@ -556,7 +556,7 @@ doreti_exit:
testl $PSL_VM,TF_EFLAGS(%esp)
jz 2f /* PCB_VM86CALL is not set */
addl $VM86_STACK_SPACE, %ecx
-2: subl $TF_SZ, %edx
+2: subl %ecx, %edx
movl %edx, %edi
rep; movsb
movl %edx, %esp