diff options
author | Ian Moffett <ian@osmora.org> | 2024-04-26 22:35:45 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-04-26 22:35:45 -0400 |
commit | 4ec7e7ba3049a44862ac5854e5d3fe0b17eca535 (patch) | |
tree | 1187e97cf94fc6841e395ce77d2094cb89dff7b4 | |
parent | 70b046a032404d0fc7dc27e761b6ee7e693afb5f (diff) |
kernel/amd64: frame: Add additional helpers
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | sys/include/arch/amd64/frame.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/include/arch/amd64/frame.h b/sys/include/arch/amd64/frame.h index 298a836..85edea9 100644 --- a/sys/include/arch/amd64/frame.h +++ b/sys/include/arch/amd64/frame.h @@ -74,5 +74,9 @@ struct trapframe { (FRAME)->rsp = SP; \ (FRAME)->ss = 0x20 | 3; \ +#define set_frame_sp(FRAME, SP) (FRAME)->rsp = SP +#define set_frame_ip(FRAME, IP) (FRAME)->rip = IP +#define get_frame_ip(FRAME) (FRAME)->rip + #endif /* !defined(__ASSEMBLER__) */ #endif /* !_AMD64_FRAME_H_ */ |