summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/ppc/clone.S
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2005-04-05 19:41:54 +0000
committerMystery Man <unknown@mandriva.org>2005-04-05 19:41:54 +0000
commit1d9a4b73a37c6e942f909c2d42ca13b5c47e8362 (patch)
tree5bab4266bc57a31d97ac6a8badc2ede721a42c9c /mdk-stage1/dietlibc/ppc/clone.S
parent4691e29d1228b10abbe586c5ecb87ec9e13bd3ec (diff)
downloaddrakx-backup-do-not-use-10_2_20mdk.tar
drakx-backup-do-not-use-10_2_20mdk.tar.gz
drakx-backup-do-not-use-10_2_20mdk.tar.bz2
drakx-backup-do-not-use-10_2_20mdk.tar.xz
drakx-backup-do-not-use-10_2_20mdk.zip
This commit was manufactured by cvs2svn to create tag 'V10_2_20mdk'.V10_2_20mdk
Diffstat (limited to 'mdk-stage1/dietlibc/ppc/clone.S')
-rw-r--r--mdk-stage1/dietlibc/ppc/clone.S48
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