summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r--src/kernel/proc.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index d85384f..abe0d04 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -393,27 +393,8 @@ static void proc_intr_deliver(Proc *p) {
}
/* save old registers */
- // TODO separate types for normal registers and sse?
- // then i could reuse the normal register type here
struct intr_data d;
- d.r15 = p->regs.r15;
- d.r14 = p->regs.r14;
- d.r13 = p->regs.r13;
- d.r12 = p->regs.r12;
- d.r11 = p->regs.r11;
- d.r10 = p->regs.r10;
- d.r9 = p->regs.r9;
- d.r8 = p->regs.r8;
- d.rdi = p->regs.rdi;
- d.rsi = p->regs.rsi;
- d.rbp = p->regs.rbp;
- d.rsp = p->regs.rsp;
- d.rbx = p->regs.rbx;
- d.rdx = p->regs.rdx;
- d.rcx = p->regs.rcx;
- d.rax = p->regs.rax;
- d.rip = p->regs.rip;
- d.flags = p->regs.flags;
+ d.reg = p->regs;
// one more because the buffer itself isn't NUL terminated
// TODO ensure NUL termination
@@ -486,7 +467,7 @@ _Noreturn void proc_switch_any(void) {
if (p->execbuf.buf) {
execbuf_run(p);
} else {
- sysexit(p->regs);
+ sysexit(&p->regs, p->sse);
}
} else {
cpu_pause();