]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/custom/__ptrace.s
xnu-1699.22.73.tar.gz
[apple/xnu.git] / libsyscall / custom / __ptrace.s
index 2fd53b4604c29760d492e958aa049d54c5e04746..9eae221f2c235ee09b03cf3e96d2670187ce27cf 100644 (file)
 
 #include "SYS.h"
 
-#if defined(__ppc__) || defined(__ppc64__)
-
-MI_ENTRY_POINT(___ptrace)
-       li      r7,0
-    MI_GET_ADDRESS(r8,_errno)
-    stw     r7,0(r8)
-    SYSCALL_NONAME(ptrace, 4)
-       blr
-
-#elif defined(__i386__)
+#if defined(__i386__)
 
        .globl  _errno
 
@@ -54,7 +45,8 @@ UNIX_SYSCALL_NONAME(ptrace, 4)
 
 LEAF(___ptrace, 0)
        xorq    %rax,%rax
-       REG_TO_EXTERN(%rax,_errno)
+       PICIFY(_errno)
+       movl    %eax,(%r11)
 UNIX_SYSCALL_NONAME(ptrace, 4)
        ret