diff options
author | dzwdz | 2022-07-16 19:35:05 +0200 |
---|---|---|
committer | dzwdz | 2022-07-16 19:35:05 +0200 |
commit | b26098268eb443f1ed3dc50d902b2beee40c8342 (patch) | |
tree | 1b7bf720cde8e68fe1f446a414f38f4f63175227 /src/kernel/arch/amd64/registers.h | |
parent | ce80ee8d40b0a2b48bfbbceac9a0baee189c5e1b (diff) |
amd64: seemingly working syscalls (SYSCALL/SYSRET)
Diffstat (limited to 'src/kernel/arch/amd64/registers.h')
-rw-r--r-- | src/kernel/arch/amd64/registers.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/kernel/arch/amd64/registers.h b/src/kernel/arch/amd64/registers.h index e365e2c..c98c647 100644 --- a/src/kernel/arch/amd64/registers.h +++ b/src/kernel/arch/amd64/registers.h @@ -3,16 +3,14 @@ #include <stdint.h> struct registers { - uint64_t edi, esi; - userptr_t ebp, esp; - uint64_t ebx, edx, ecx, eax; - - userptr_t eip; + uint64_t r15, r14, r13, r12, r11, r10, r9, r8; + uint64_t rdi, rsi; + userptr_t rbp, rsp; + uint64_t rbx, rdx, rcx, rax; } __attribute__((__packed__)); // saves a return value according to the SysV ABI static inline uint64_t regs_savereturn(struct registers *regs, uint64_t value) { - regs->eax = value; - regs->edx = value >> 32; // TODO check ABI + regs->rax = value; return value; } |