about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sparc/sparc32/fork.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc/sparc32/fork.S')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/fork.S12
1 files changed, 4 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/fork.S b/sysdeps/unix/sysv/linux/sparc/sparc32/fork.S
index 951ab4981b..73334ed528 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/fork.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/fork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Miguel de Icaza <miguel@gnu.ai.mit.edu>, 1997.
 
@@ -20,13 +20,9 @@
 #include <sysdep.h>
 
 PSEUDO (__libc_fork, fork, 0)
-	tst %o1
-	be,a parent
-	nop
-	/* child: return 0 */
-	clr %o0
-parent:
-	ret
+	sub %o1, 1, %o1
+	retl
+	 and %o0, %o1, %o0
 
 PSEUDO_END (__libc_fork)
 weak_alias (__libc_fork, __fork)