summaryrefslogtreecommitdiff
path: root/src/kernel/arch/i386/sysenter.s
diff options
context:
space:
mode:
authordzwdz2022-07-15 11:16:11 +0200
committerdzwdz2022-07-15 11:16:11 +0200
commit1eeb66af44ab335888410d716d604e569f20866e (patch)
tree78d804afe3eb28ea1cbd776edaf24c991d27a723 /src/kernel/arch/i386/sysenter.s
parent7138c8427d7e635189468b8f60e41dbbab05ea23 (diff)
i686: stop using pushal/popal in sysenter/sysexit
Diffstat (limited to 'src/kernel/arch/i386/sysenter.s')
-rw-r--r--src/kernel/arch/i386/sysenter.s18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/kernel/arch/i386/sysenter.s b/src/kernel/arch/i386/sysenter.s
index edfabf0..d04f839 100644
--- a/src/kernel/arch/i386/sysenter.s
+++ b/src/kernel/arch/i386/sysenter.s
@@ -45,7 +45,14 @@ _sysexit_real:
// restore the registers
mov $_sysexit_regs, %esp
- popal
+ pop %edi
+ pop %esi
+ pop %ebp
+ add $4, %esp
+ pop %ebx
+ pop %edx
+ pop %ecx
+ pop %eax
// enable paging
mov %eax, stored_eax
@@ -69,7 +76,14 @@ sysenter_stage1:
// save the registers
mov $(_sysexit_regs + 32), %esp
- pushal
+ push %eax
+ push %ecx
+ push %edx
+ push %ebx
+ push $0x0 // pushal pushes %esp here, but that's worthless
+ push %ebp
+ push %esi
+ push %edi
mov $_bss_end, %esp
jmp sysenter_stage2