Skip to content

Commit aa772fc

Browse files
kubamracektambry
authored andcommitted
[compiler-rt] [builtins] Make lse.S compile on Darwin
Reviewed By: ilinpv Differential Revision: https://reviews.llvm.org/D92530
1 parent e42e526 commit aa772fc

File tree

1 file changed

+5
-0
lines changed
  • compiler-rt/lib/builtins/aarch64

1 file changed

+5
-0
lines changed

compiler-rt/lib/builtins/aarch64/lse.S

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,13 @@ HIDDEN(__aarch64_have_lse_atomics)
102102

103103
// Macro for branch to label if no LSE available
104104
.macro JUMP_IF_NOT_LSE label
105+
#if !defined(__APPLE__)
105106
adrp x(tmp0), __aarch64_have_lse_atomics
106107
ldrb w(tmp0), [x(tmp0), :lo12:__aarch64_have_lse_atomics]
108+
#else
109+
adrp x(tmp0), __aarch64_have_lse_atomics@page
110+
ldrb w(tmp0), [x(tmp0), __aarch64_have_lse_atomics@pageoff]
111+
#endif
107112
cbz w(tmp0), \label
108113
.endm
109114

0 commit comments

Comments
 (0)