From 041cdc2769407c4d3869b218ad7ee7638e1c306e Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 24 May 2017 20:49:02 +0200 Subject: sparc64: add basic support No NPTL, no LDSO support. Bootup with Busybox Ash in Qemu working. Testuite shows only two failures, but mksh continue/break support doesn't work. --- libc/sysdeps/linux/sparc64/fork.S | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 libc/sysdeps/linux/sparc64/fork.S (limited to 'libc/sysdeps/linux/sparc64/fork.S') diff --git a/libc/sysdeps/linux/sparc64/fork.S b/libc/sysdeps/linux/sparc64/fork.S new file mode 100644 index 000000000..55c5e8d5c --- /dev/null +++ b/libc/sysdeps/linux/sparc64/fork.S @@ -0,0 +1,32 @@ +/* + * The fork and vfork system calls are special on sparc64: + * they return the "other process" pid in %o0 and the + * "is child" flag in %o1 + */ + +#include +#include + +.text +.global fork +.type fork, @function +.align 4 + +fork: + mov __NR_fork, %g1 + ta 0x6d + sub %o1, 1, %o1 + bcc,pt %xcc, 1f + and %o0, %o1, %o0 + sethi %hi(errno), %g4 + or %g4, %lo(errno), %g4 + st %o0, [%g4] + retl + mov -1, %o0 +1: + retl + nop + +.size fork, . - fork + +libc_hidden_def(fork) -- cgit v1.2.3