aboutsummaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-04-26 22:35:45 -0400
committerIan Moffett <ian@osmora.org>2024-04-26 22:35:45 -0400
commit4ec7e7ba3049a44862ac5854e5d3fe0b17eca535 (patch)
tree1187e97cf94fc6841e395ce77d2094cb89dff7b4 /sys/include
parent70b046a032404d0fc7dc27e761b6ee7e693afb5f (diff)
kernel/amd64: frame: Add additional helpers
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/arch/amd64/frame.h4
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_ */