1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #include <sys/syscall.h>
- .text;
- .global fork;
- .align 4;
- .type fork,@function;
- fork:
- mov __NR_fork, %g1
- ta 0x10
- bcc,a 9000f
- nop
- save %sp,-96,%sp
- call __errno_location
- nop
- st %i0,[%o0]
- jmpl %i7+8,%g0
- restore %g0,-1,%o0
- 9000:
- sub %o1, 1, %o1
- retl
- and %o0, %o1, %o0
- .size fork,.-fork;
|