From 9497b090cc1b53cea119b14d8b68d305cc2c73e0 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 14 May 2025 22:44:47 -0400 Subject: kernel: mach: Add TF_IP() macro Add TF_IP() to extract the instruction pointer from a trapframe between architectures. Signed-off-by: Ian Moffett --- sys/include/arch/amd64/frame.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/include/arch/amd64') diff --git a/sys/include/arch/amd64/frame.h b/sys/include/arch/amd64/frame.h index 31dcdef..2bd9a7c 100644 --- a/sys/include/arch/amd64/frame.h +++ b/sys/include/arch/amd64/frame.h @@ -58,4 +58,6 @@ struct trapframe { uint64_t ss; }; +#define TF_IP(TFP) ((TFP)->rip) + #endif /* !_MACHINE_FRAME_H_ */ -- cgit v1.2.3