summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/registers.h
diff options
context:
space:
mode:
authordzwdz2024-07-27 19:59:37 +0200
committerdzwdz2024-07-27 20:00:29 +0200
commitfe6fbfa07aa8326926049cf62560d940bc7305c0 (patch)
treee97060cb23c8a5a227fe615b97d9213d5fc2ad1e /src/kernel/arch/amd64/registers.h
parent58514d351e1f0e8871f534422cf025109ddbb844 (diff)
kernel: don't use pointer types for registers, add proc_savereturn
Diffstat (limited to 'src/kernel/arch/amd64/registers.h')
-rw-r--r--src/kernel/arch/amd64/registers.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/kernel/arch/amd64/registers.h b/src/kernel/arch/amd64/registers.h
index cfbfa54..a76062f 100644
--- a/src/kernel/arch/amd64/registers.h
+++ b/src/kernel/arch/amd64/registers.h
@@ -5,14 +5,7 @@
/* requires 16-byte alignment */
struct CpuRegs {
uint64_t r15, r14, r13, r12, r11, r10, r9, r8;
- uint64_t rdi, rsi;
- userptr_t rbp, rsp;
- uint64_t rbx, rdx, rcx, rax, rip, flags;
+ uint64_t rdi, rsi, rbp, rsp, rbx, rdx, rcx, rax;
+ uint64_t rip, flags;
uint8_t _sse[512];
} __attribute__((__packed__));
-
-// saves a return value according to the SysV ABI
-static inline uint64_t regs_savereturn(CpuRegs *regs, uint64_t value) {
- regs->rax = value;
- return value;
-}