From e452373ba8ddac9118b7e562a7e5fb8b47b33412 Mon Sep 17 00:00:00 2001 From: Graeme Winter Date: Sun, 14 Sep 2025 07:39:09 +0100 Subject: [PATCH] Use darwin syntax, with #define --- context/switch-arm64.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/context/switch-arm64.c b/context/switch-arm64.c index 9b1fbf4b..2eed23cc 100644 --- a/context/switch-arm64.c +++ b/context/switch-arm64.c @@ -105,7 +105,12 @@ FSIZE(switch_frame) FNAME(create_frame) " stp x1, x2, [x0, #-16]!\n" " mov x16, lr\n" // Save LR so can use same STP slot +#if defined(__aarch64__) && defined(__APPLE__) // darwin syntax +" adrp lr, action_entry@PAGE\n" +" add lr, lr, action_entry@PAGEOFF\n" +#else " ldr lr, =action_entry\n" +#endif " stp x19, x20, [x0, #-16]!\n" " stp x21, x22, [x0, #-16]!\n" " stp x23, x24, [x0, #-16]!\n"