diff options
Diffstat (limited to 'libc/sysdeps/linux/csky/csky_clone.S')
-rw-r--r-- | libc/sysdeps/linux/csky/csky_clone.S | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/csky/csky_clone.S b/libc/sysdeps/linux/csky/csky_clone.S new file mode 100644 index 000000000..83604691f --- /dev/null +++ b/libc/sysdeps/linux/csky/csky_clone.S @@ -0,0 +1,20 @@ +#include <sysdep.h> + +PSEUDO_ERRVAL(__csky_clone, clone, 5) + cmpnei a0, 0 + bf start_thread + rts + +start_thread: +#ifdef __CSKYABIV2__ + subi sp, 4 +#endif + ld.w a0, (sp, 0x4) + ld.w a1, (sp, 0x0) + addi sp, 8 + jsr a1 + + DO_CALL(exit, 0) + +END(__csky_clone) + |