123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- #include <asm/unistd.h>
- #define _ERRNO_H 1
- #include <bits/errno.h>
- #include <sys/syscall.h>
- .text
- .global __clone
- .type __clone,%function
- __clone:
-
-
- comib,= 0,%arg0,.Lerror
- ldi -EINVAL,%ret0
- comib,= 0,%arg1,.Lerror
- nop
-
- stwm %arg0,64(%arg1)
- stw %arg3,-60(%arg1)
-
- #ifdef __PIC__
- stw %r19,-32(%sr0, %sp)
- #endif
-
- copy %arg2,%arg0
- ble 0x100(%sr2,%r0)
- ldi __NR_clone,%r20
- ldi -4096,%r1
- comclr,>>= %r1,%ret0,%r0
- b,n .Lerror
- comib,=,n 0,%ret0,thread_start
-
- bv %r0(%rp)
- nop
-
- .Lerror:
-
- #ifdef __PIC__
- ldw -32(%sr0, %sp), %r19
- #endif
- b __syscall_error
- sub %r0,%ret0,%arg0
- thread_start:
-
- ldw -60(%sr0, %sp),%arg0
- ldw -64(%sr0, %sp),%r22
-
-
- bl $$dyncall,%r31
- copy %r31,%rp
- bl _exit,%rp
- copy %ret0,%arg0
-
- iitlbp %r0,(%r0)
- .size __clone,.-__clone
- .weak clone
- clone = __clone
|