diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-05-06 02:43:04 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-05-06 02:43:04 +0000 |
commit | 4e506c9aefe5b89970ae6894d05ad53c81af0d83 (patch) | |
tree | 2fac98df209e72eaba773cad2d7b90c99d9d9249 /mdk-stage1/dietlibc/ppc/clone.S | |
parent | 793707b39bf2e9df40a6d2d60b83b3061088ae9e (diff) | |
download | drakx-backup-do-not-use-4e506c9aefe5b89970ae6894d05ad53c81af0d83.tar drakx-backup-do-not-use-4e506c9aefe5b89970ae6894d05ad53c81af0d83.tar.gz drakx-backup-do-not-use-4e506c9aefe5b89970ae6894d05ad53c81af0d83.tar.bz2 drakx-backup-do-not-use-4e506c9aefe5b89970ae6894d05ad53c81af0d83.tar.xz drakx-backup-do-not-use-4e506c9aefe5b89970ae6894d05ad53c81af0d83.zip |
use installed dietlibc, not our forked cvs version
Diffstat (limited to 'mdk-stage1/dietlibc/ppc/clone.S')
-rw-r--r-- | mdk-stage1/dietlibc/ppc/clone.S | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/mdk-stage1/dietlibc/ppc/clone.S b/mdk-stage1/dietlibc/ppc/clone.S deleted file mode 100644 index 98f6bd4e8..000000000 --- a/mdk-stage1/dietlibc/ppc/clone.S +++ /dev/null @@ -1,48 +0,0 @@ -#include <dietfeatures.h> -#include "syscalls.h" -#include <errno.h> - -.text -.weak clone -clone: -.global __clone -__clone: - cmpwi 4,0 /* check have non null child_stack pointer */ - cmpwi cr1, 3,0 /* check have non null thread_funcion */ - cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */ - beq .Lclone_error - - stwu 1,-32(1) /* alloc some space on the stack */ - stmw 29, 16(1) /* save r29,r30,r31 on stack */ - - rlwinm 4,4,0,0,27 /* mask out lower 4 bits */ - - /* move parameter to positions clone wants them */ - mr 29,3 /* r29 = r3 fn */ - mr 30,4 /* r30 = r4 stack */ - mr 31,6 /* r31 = r6 arg */ - mr 3, 5 /* r3 = r5 flags */ - - li 0, __NR_clone /* load syscall nr. */ - sc - - cmpwi cr1,3,0 /* compare return of syscall with 0 */ - crandc 4*cr1+eq,4*cr1+eq,so - bne .Lclone_parent /* return was non zero -> .Lclone_parent */ - - /* we are the cloned process */ - mr 1, 30 /* set stack pointer */ - mtctr 29 /* set count register to fn ? */ - mr 3, 31 /* set argument */ - bctrl /* branch trough count register and link */ - b _exit /* exit thread */ - -.Lclone_parent: - lmw 29,16(1) /* restore saved registers */ - addi 1, 1,32 /* free stack */ - bnslr+ /* had cloned a thread so return to parent */ - b error_unified_syscall - -.Lclone_error: - li 3, EINVAL - b error_unified_syscall |