123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #define _ERRNO_H
- #include <features.h>
- #include <bits/errno.h>
- #include <sys/syscall.h>
- #include "m68k_pic.S"
- .text
- .align 4
- .type clone,
- .globl clone
- clone:
-
- movel #-EINVAL, %d0
- movel 4(%sp), %d1
- movel %d1, %a0
- tstl %d1
- beq.w __syscall_error_trampoline
- movel 8(%sp), %d1
- movel %d1, %a1
- tstl %d1
- beq.w __syscall_error_trampoline
-
- movel 16(%sp), -(%a1)
-
- #if 1
- movel %d2, %d1
- movel %a1, %d2
- movel %d1, %a1
- #else
- exg %d2, %a1
- #endif
- movel 12(%sp), %d1
- movel #__NR_clone, %d0
- trap #0
- #if 1
- movel %d2, %d1
- movel %a1, %d2
- movel %d1, %a1
- #else
- exg %d2, %a1
- #endif
- tstl %d0
- bmi.w __syscall_error_trampoline
- beq.w thread_start
- rts
- thread_start:
-
- jsr (%a0)
- movel %d0, -(%sp)
- movel #__NR_exit, %d0
- trap #0
-
- __syscall_error_trampoline:
- JUMP __syscall_error,%a0
|