aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/i386/vm86bios.s
diff options
context:
space:
mode:
authorKip Macy <kmacy@FreeBSD.org>2006-12-17 05:07:01 +0000
committerKip Macy <kmacy@FreeBSD.org>2006-12-17 05:07:01 +0000
commita5c5d4402c3176b9cf62b7e06c2cf59e2e00486d (patch)
tree1efe0da4c2d3a8dd001c384ae0b90857bc051940 /sys/i386/i386/vm86bios.s
parent9c50a94180a5950d809f8f8e7cc2d33a8fc9d538 (diff)
downloadsrc-a5c5d4402c3176b9cf62b7e06c2cf59e2e00486d.tar.gz
src-a5c5d4402c3176b9cf62b7e06c2cf59e2e00486d.zip
Evidently FreeBSD has long relied on the compiler to treat structures
passed by value (trap frames) as if they were in fact being passed by reference. For better or worse, this incorrect behaviour is no longer present in gcc 4.1. In this patch I convert all trapframe arguments to be explicitly pass by reference. I also remove vm86_initflags, pushing the very little work that it actually does up into vm86_prepcall. Reviewed by: kan Tested by: kan
Notes
Notes: svn path=/head/; revision=165302
Diffstat (limited to 'sys/i386/i386/vm86bios.s')
-rw-r--r--sys/i386/i386/vm86bios.s6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/i386/i386/vm86bios.s b/sys/i386/i386/vm86bios.s
index a32daf7ddc86..36b5b1486e6a 100644
--- a/sys/i386/i386/vm86bios.s
+++ b/sys/i386/i386/vm86bios.s
@@ -128,9 +128,11 @@ ENTRY(vm86_bioscall)
#endif
movl %ecx,%cr3 /* new page tables */
movl SCR_VMFRAME(%edx),%esp /* switch to new stack */
-
- call vm86_prepcall /* finish setup */
+ pushl %esp
+ call vm86_prepcall /* finish setup */
+ add $4, %esp
+
/*
* Return via doreti
*/