Skip to content

Commit aa43929

Browse files
authored
Merge pull request #76 from graeme-winter/macOS-aarch64-action-entry
Use darwin / clang syntax, with #define for platform
2 parents da8b793 + e452373 commit aa43929

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

context/switch-arm64.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,12 @@ FSIZE(switch_frame)
105105
FNAME(create_frame)
106106
" stp x1, x2, [x0, #-16]!\n"
107107
" mov x16, lr\n" // Save LR so can use same STP slot
108+
#if defined(__aarch64__) && defined(__APPLE__) // darwin syntax
109+
" adrp lr, action_entry@PAGE\n"
110+
" add lr, lr, action_entry@PAGEOFF\n"
111+
#else
108112
" ldr lr, =action_entry\n"
113+
#endif
109114
" stp x19, x20, [x0, #-16]!\n"
110115
" stp x21, x22, [x0, #-16]!\n"
111116
" stp x23, x24, [x0, #-16]!\n"

0 commit comments

Comments
 (0)