summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/registers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/arch/amd64/registers.h')
-rw-r--r--src/kernel/arch/amd64/registers.h12
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;
}