File:  [DVB] / dietlibc / aarch64 / clone.S
Revision 1.1: download - view: text, annotated - select for diffs
Mon Jun 6 12:02:02 2016 UTC (7 years, 11 months ago) by leitner
Branches: MAIN
CVS tags: HEAD
  aarch64 port (Christian Seiler)

#include "syscalls.h"
#include "dietfeatures.h"

#include <errno.h>

FUNC_START	clone
	/* sanity checks */
	cbz	x0, .Linval
	cbz	x1, .Linval
	/* put function pointer, arg pointer on the new stack */
	stp	x0, x3, [x1, #-16]!
	mov	x0, x2 /* flags */
	mov	x2, x4 /* ptid */
	mov	x3, x5 /* tls */
	mov	x4, x6 /* ctid */
	mov	x8, #__NR_clone
	svc	#0
	cbz	x0, .Lchild
	b	__unified_syscall
.Linval:
	mov	x0, #-EINVAL
	b	__unified_syscall

.Lchild:
	mov	x29, #0
	ldp	x1, x0, [sp], #16
	blr	x1
	b	exit
FUNC_END	clone

LinuxTV legacy CVS <linuxtv.org/cvs>