X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/36401178fd6817c043cc00b0c00c7f723e58efae..527f99514973766e9c0382a4d8550dfb00f54939:/libsyscall/custom/__pipe.s diff --git a/libsyscall/custom/__pipe.s b/libsyscall/custom/__pipe.s index 107a37799..0c527d5ea 100644 --- a/libsyscall/custom/__pipe.s +++ b/libsyscall/custom/__pipe.s @@ -29,19 +29,9 @@ #include "SYS.h" -#if defined(__ppc__) || defined(__ppc64__) +#if defined(__i386__) -MI_ENTRY_POINT(___pipe) - mr r12,r3 // save fildes across syscall - SYSCALL_NONAME(pipe, 0) - stw r3,0(r12) - stw r4,4(r12) - li r3,0 - blr - -#elif defined(__i386__) - -PSEUDO_INT(__pipe, pipe, 0) +PSEUDO_INT(___pipe, pipe, 0) movl 4(%esp),%ecx movl %eax,(%ecx) movl %edx,4(%ecx) @@ -50,12 +40,31 @@ PSEUDO_INT(__pipe, pipe, 0) #elif defined(__x86_64__) -PSEUDO(__pipe, pipe, 0) +PSEUDO(___pipe, pipe, 0, cerror_nocancel) movl %eax, (%rdi) movl %edx, 4(%rdi) xorl %eax, %eax ret +#elif defined(__arm__) + +MI_ENTRY_POINT(___pipe) + mov r3,r0 // save fildes across syscall + SYSCALL_NONAME(pipe, 0, cerror_nocancel) + str r0, [r3, #0] + str r1, [r3, #4] + mov r0,#0 + bx lr + +#elif defined(__arm64__) + +MI_ENTRY_POINT(___pipe) + mov x9, x0 // Stash FD array + SYSCALL_NONAME(pipe, 0, cerror_nocancel) + stp w0, w1, [x9] // Save results + mov x0, #0 // Success + ret // Done + #else #error Unsupported architecture #endif