summaryrefslogtreecommitdiff
path: root/Kernel/Process.cpp
diff options
context:
space:
mode:
authorUndefine <undefine@undefine.pl>2022-07-22 20:48:24 +0200
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-07-27 21:46:42 +0000
commit97cc33ca47c21f21c13d0b386511f589b25b7998 (patch)
tree4eecc8720ce2c0cb371ca44d2cbafb39d434e14d /Kernel/Process.cpp
parent6c4b5775e1ac45a96d3b8c65b3e7fb93a6135d3d (diff)
downloadserenity-97cc33ca47c21f21c13d0b386511f589b25b7998.zip
Everywhere: Make the codebase more architecture aware
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r--Kernel/Process.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 90a0c38456..78743d390a 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -191,8 +191,10 @@ RefPtr<Process> Process::create_kernel_process(RefPtr<Thread>& first_thread, Non
first_thread->regs().set_ip((FlatPtr)entry);
#if ARCH(I386)
first_thread->regs().esp = FlatPtr(entry_data); // entry function argument is expected to be in regs.esp
-#else
+#elif ARCH(X86_64)
first_thread->regs().rdi = FlatPtr(entry_data); // entry function argument is expected to be in regs.rdi
+#else
+# error Unknown architecture
#endif
if (do_register == RegisterProcess::Yes)