summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/csky/csky_clone.S
blob: 83604691f39b8d7a5edf9aacb6684b56c2d24467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)