]> git.saurik.com Git - apple/libsystem.git/blobdiff - spinlock_stub.s
Libsystem-88.3.6.tar.gz
[apple/libsystem.git] / spinlock_stub.s
index 2d9a6e17b24f8fccc2272213c00b094896b8d4a6..9d3b3aed34d12f8f555ed9d85bffb7d17a8634b8 100644 (file)
@@ -25,7 +25,8 @@
 
 #define __APPLE_API_PRIVATE
 #include <machine/cpu_capabilities.h>
 
 #define __APPLE_API_PRIVATE
 #include <machine/cpu_capabilities.h>
-#if defined(__ppc__)
+#if defined(__ppc__) || defined(__ppc64__)
+#include <architecture/ppc/mode_independent_asm.h>
 .data
 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
         .align 2
 .data
 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
         .align 2
@@ -43,14 +44,14 @@ L__spin_lock$stub:
 .lazy_symbol_pointer
 L__spin_lock$lazy_ptr:
         .indirect_symbol __spin_lock
 .lazy_symbol_pointer
 L__spin_lock$lazy_ptr:
         .indirect_symbol __spin_lock
-        .long dyld_stub_binding_helper
+        .g_long dyld_stub_binding_helper
 #elif defined(__i386__)
 .data
 .picsymbol_stub
 L__spin_lock$stub:
         .indirect_symbol __spin_lock
         movl    $(_COMM_PAGE_SPINLOCK_LOCK), %eax
 #elif defined(__i386__)
 .data
 .picsymbol_stub
 L__spin_lock$stub:
         .indirect_symbol __spin_lock
         movl    $(_COMM_PAGE_SPINLOCK_LOCK), %eax
-        jmp     %eax
+        jmp     *%eax
         nop
         call    LPC$1
 LPC$1:  popl    %eax
         nop
         call    LPC$1
 LPC$1:  popl    %eax