summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-06-30 13:08:54 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-30 15:13:30 +0200
commit50839bd1f10724d2c56b540f57b71cef39ba8315 (patch)
tree05f68a765df82d532a5fea22fcbcae36dfdf5a89
parentcafccb866c7606014d82ee5fc18d4569b51044ce (diff)
downloadserenity-50839bd1f10724d2c56b540f57b71cef39ba8315.zip
Kernel: Properly initialize r8-r15 for new threads on x86_64
-rw-r--r--Kernel/Arch/x86/x86_64/Processor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Kernel/Arch/x86/x86_64/Processor.cpp b/Kernel/Arch/x86/x86_64/Processor.cpp
index acb409b8b8..d46f7015f5 100644
--- a/Kernel/Arch/x86/x86_64/Processor.cpp
+++ b/Kernel/Arch/x86/x86_64/Processor.cpp
@@ -109,6 +109,14 @@ FlatPtr Processor::init_context(Thread& thread, bool leave_crit)
iretframe.rdx = regs.rdx;
iretframe.rcx = regs.rcx;
iretframe.rax = regs.rax;
+ iretframe.r8 = regs.r8;
+ iretframe.r9 = regs.r9;
+ iretframe.r10 = regs.r10;
+ iretframe.r11 = regs.r11;
+ iretframe.r12 = regs.r12;
+ iretframe.r13 = regs.r13;
+ iretframe.r14 = regs.r14;
+ iretframe.r15 = regs.r15;
iretframe.rflags = regs.rflags;
iretframe.rip = regs.rip;
iretframe.cs = regs.cs;