1/* int clone(fn, stack, flags, arg, ptid, tls, ctid) 2 * r3 r4 r5 r6 sp+0 sp+4 sp+8 3 * sys_clone(flags, stack, ptid, ctid, tls) 4 */ 5.global __clone 6.hidden __clone 7.type __clone,@function 8__clone: 9 l.addi r4, r4, -8 10 l.sw 0(r4), r3 11 l.sw 4(r4), r6 12 /* (fn, st, fl, ar, pt, tl, ct) => (fl, st, pt, ct, tl) */ 13 l.ori r3, r5, 0 14 l.lwz r5, 0(r1) 15 l.lwz r6, 8(r1) 16 l.lwz r7, 4(r1) 17 l.ori r11, r0, 220 /* __NR_clone */ 18 l.sys 1 19 20 l.sfeqi r11, 0 21 l.bf 1f 22 l.nop 23 l.jr r9 24 l.nop 25 261: l.lwz r11, 0(r1) 27 l.jalr r11 28 l.lwz r3, 4(r1) 29 30 l.ori r11, r0, 93 /* __NR_exit */ 31 l.sys 1 32