123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- .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
- subu sp,32
- .set noat
- move $1,ra
- jal _mcount
- .set at
-
- li v0,EINVAL
- beqz a0,error
- beqz a1,error
- subu a1,32
- sw a0,0(a1)
- sw a3,4(a1)
-
- move a0,a2
- li v0,__NR_clone
- syscall
- bnez a3,error
- beqz v0,__thread_start
-
- addiu sp,32
- j $31
-
- error:
- addiu sp,32
- la t9,__syscall_error
- jr t9
- j __syscall_error
- .end __clone
- .globl __thread_start;
- .align 2;
- .ent __thread_start, 0;
- __thread_start:
-
- .cprestore 16
-
-
- lw t9,0(sp)
- lw a0,4(sp)
-
- jalr t9
-
- move a0,v0
- la t9,_exit
- jalr t9
- jal _exit
- .end __thread_start
- .weak clone;
- clone = __clone
|