diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2025-05-12 13:51:12 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2025-05-12 13:51:12 +0000 |
| commit | 29e067867e7a437d12351b481024d4bab431b202 (patch) | |
| tree | 97479edda8e06ea5b09ee77096ab117b4cfe8499 /arch/x86_64/src/context_switching/syscall/main.cpp | |
| parent | ee4c61f7313fedd23d01c69ea5036fa38ef6248a (diff) | |
| download | kernel-29e067867e7a437d12351b481024d4bab431b202.tar.xz kernel-29e067867e7a437d12351b481024d4bab431b202.zip | |
Fix crashes because of are frame allocator copy
Diffstat (limited to 'arch/x86_64/src/context_switching/syscall/main.cpp')
| -rw-r--r-- | arch/x86_64/src/context_switching/syscall/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86_64/src/context_switching/syscall/main.cpp b/arch/x86_64/src/context_switching/syscall/main.cpp index 996d7fb..e291c10 100644 --- a/arch/x86_64/src/context_switching/syscall/main.cpp +++ b/arch/x86_64/src/context_switching/syscall/main.cpp @@ -18,9 +18,6 @@ namespace teachos::arch::context_switching::syscall asm volatile("syscall"); - error error_code{}; - asm volatile("mov %%rax, %[output]" : [output] "=m"(error_code)); - arguments values{}; asm volatile("mov %%rdi, %[output]" : [output] "=m"(values.arg_0)); asm volatile("mov %%rsi, %[output]" : [output] "=m"(values.arg_1)); @@ -29,6 +26,9 @@ namespace teachos::arch::context_switching::syscall asm volatile("mov %%r8, %[output]" : [output] "=m"(values.arg_4)); asm volatile("mov %%r9, %[output]" : [output] "=m"(values.arg_5)); + error error_code{}; + asm volatile("mov %%rax, %[output]" : [output] "=m"(error_code)); + return {error_code, values}; } |
