X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/2d21ac55c334faf3a56e5634905ed6987fc787d4..13f56ec4e58bf8687e2a68032c093c0213dd519b:/libsyscall/custom/__ptrace.s?ds=sidebyside diff --git a/libsyscall/custom/__ptrace.s b/libsyscall/custom/__ptrace.s index 400b75497..9eae221f2 100644 --- a/libsyscall/custom/__ptrace.s +++ b/libsyscall/custom/__ptrace.s @@ -29,16 +29,7 @@ #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,21 +45,11 @@ 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 -#elif defined(__arm__) - -MI_ENTRY_POINT(_ptrace) - MI_GET_ADDRESS(ip,_errno) - str r8, [sp, #-4]! - mov r8, #0 - str r8, [ip] - ldr r8, [sp], #4 - SYSCALL_NONAME(ptrace, 4) - bx lr - #else #error Unsupported architecture #endif