From 4ec7e7ba3049a44862ac5854e5d3fe0b17eca535 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 26 Apr 2024 22:35:45 -0400 Subject: kernel/amd64: frame: Add additional helpers Signed-off-by: Ian Moffett --- sys/include/arch/amd64/frame.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/include/arch/amd64/frame.h') 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_ */ -- cgit v1.2.3