summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/i960/clone.S
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2015-12-28 22:43:01 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-01-02 16:57:03 +0100
commit82b948ef8ffd2770fb09a8640dab82f3cb2af443 (patch)
tree17380b9ddad8301a6feadc66f18986074e5e5ce8 /libc/sysdeps/linux/i960/clone.S
parentbad1263e3316825b5ef0037ad7a897ae62a30d7e (diff)
remove deprecated architectures v850/i960
Both architectures are more or less deprecated. No Linux upstream support, no gcc support for uClinux.
Diffstat (limited to 'libc/sysdeps/linux/i960/clone.S')
-rw-r--r--libc/sysdeps/linux/i960/clone.S61
1 files changed, 0 insertions, 61 deletions
diff --git a/libc/sysdeps/linux/i960/clone.S b/libc/sysdeps/linux/i960/clone.S
deleted file mode 100644
index 9419f287c..000000000
--- a/libc/sysdeps/linux/i960/clone.S
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# clone.S, part of the i960 support for the uClibc library.
-#
-# Copyright (C) 2002 by Okiok Data Ltd. http://www.okiok.com/
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# Derived from an old port of uC-libc to the i960 by Keith Adams (kma@cse.ogi.edu).
-#
-
-#include <sys/syscall.h>
-#include <bits/errno.h>
-
-/* clone is even more special than fork as it mucks with stacks
- and invokes a function in the right context after its all over. */
-
-/* int _clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
-
- .globl clone
-clone:
- /* set up new stack image in regs r4-r7; argument will be in r3 in child. */
- ldconst 0, r4 /* pfp == 0 */
- addo 16, g1, r5 /* sp == newfp + 16 */
- mov g0, r6 /* rip == fnc */
- mov g2, r7
- stq r4, (g1)
-
- addo sp, 4, sp
- st g10, -4(sp)
- mov sp, g10
- ldconst __NR_clone, g13
- calls 0
-
- /* Do the system call */
- cmpibg 0, g0, __syscall_error /* if < 0, error */
- be thread_start /* if == 0, we're the child */
- ret /* we're the parent */
-
-__syscall_error:
- not g0, r3
- callx ___errno_location
- st r3, (g0)
- ret
-
-thread_start:
- # our new pfp is in g1; here we go
- flushreg
- mov g1, pfp
- flushreg
- ret