summaryrefslogtreecommitdiff
path: root/src/kernel/arch/i386/sysenter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/arch/i386/sysenter.c')
-rw-r--r--src/kernel/arch/i386/sysenter.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/kernel/arch/i386/sysenter.c b/src/kernel/arch/i386/sysenter.c
index a2810b2..9ba826b 100644
--- a/src/kernel/arch/i386/sysenter.c
+++ b/src/kernel/arch/i386/sysenter.c
@@ -6,19 +6,9 @@ struct registers _sysexit_regs; // a hack
extern void _sysexit_real();
void sysexit(struct registers regs) {
- _sysexit_regs = (struct registers) {
- .eax = regs.eax,
- .ebx = regs.ebx,
- .ebp = regs.ebp,
- .esi = regs.esi,
- .edi = regs.edi,
-
- // sysexit args
- .ecx = regs.esp,
- .edx = regs.eip,
-
- // ESP doesn't matter
- };
+ _sysexit_regs = regs;
+ _sysexit_regs.ecx = regs.esp;
+ _sysexit_regs.edx = regs.eip;
_sysexit_real();
}