[compiler-rt] aa772fc - [compiler-rt] [builtins] Make lse.S compile on Darwin

Raul Tambre via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 06:38:55 PST 2020


Author: Kuba Mracek
Date: 2020-12-14T16:38:48+02:00
New Revision: aa772fc85e0f526615c78b9c3979c2be945a754c

URL: https://github.com/llvm/llvm-project/commit/aa772fc85e0f526615c78b9c3979c2be945a754c
DIFF: https://github.com/llvm/llvm-project/commit/aa772fc85e0f526615c78b9c3979c2be945a754c.diff

LOG: [compiler-rt] [builtins] Make lse.S compile on Darwin

Reviewed By: ilinpv

Differential Revision: https://reviews.llvm.org/D92530

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/builtins/aarch64/lse.S b/compiler-rt/lib/builtins/aarch64/lse.S
index 4c75fa524c44..770f098b7cf1 100644
--- a/compiler-rt/lib/builtins/aarch64/lse.S
+++ b/compiler-rt/lib/builtins/aarch64/lse.S
@@ -102,8 +102,13 @@ HIDDEN(__aarch64_have_lse_atomics)
 
 // Macro for branch to label if no LSE available
 .macro JUMP_IF_NOT_LSE label
+#if !defined(__APPLE__)
         adrp    x(tmp0), __aarch64_have_lse_atomics
         ldrb    w(tmp0), [x(tmp0), :lo12:__aarch64_have_lse_atomics]
+#else
+        adrp    x(tmp0), __aarch64_have_lse_atomics at page
+        ldrb    w(tmp0), [x(tmp0), __aarch64_have_lse_atomics at pageoff]
+#endif
         cbz     w(tmp0), \label
 .endm
 


        


More information about the llvm-commits mailing list