123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- .text
- .globl clone ;
- .align 2;
- .type clone,@function;
- .ent clone, 0;
-
- clone:
- .frame sp, 4*SZREG, sp
- .set noreorder
- .cpload $25
- .set reorder
- subu sp,32
- .cprestore 16
- PTR_SUBU sp,32
- .cpsetup $25, 16, clone
- subu sp,32
-
- li v0,EINVAL
- beqz a0,L(error)
- beqz a1,L(error)
- and a1,~(16-1)
- PTR_SUBU a1,32
- PTR_S a0,0(a1)
- PTR_S a3,PTRSIZE(a1)
-
- move a0,a2
- li v0,__NR_clone
- syscall
- bnez a3,L(error)
- beqz v0,L(__thread_start)
-
- .cpreturn
- PTR_ADDU sp,32
- j $31
-
- L(error):
- .cpreturn
- PTR_ADDU sp,32
-
- move a0,v0
-
- PTR_LA t9,__syscall_error
- jr t9
- j __syscall_error
- .end clone
- .globl __thread_start;
- .align 2;
- .ent __thread_start, 0;
- __thread_start:
- L(__thread_start):
- .frame sp, 24, sp
-
- .cprestore 16
-
-
- PTR_L t9,0(sp)
- PTR_L a0,PTRSIZE(sp)
-
- jal t9
-
- move a0,v0
- PTR_LA t9,_exit
- jalr t9
- jal _exit
- .end __thread_start
- weak_alias(clone, __clone)
|