summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2009-09-10 18:14:22 +0200
committerCarmelo Amoroso <carmelo.amoroso@st.com>2009-10-10 08:01:04 +0200
commitdefe0a2ced5d3234fb32ceba5fb8bc72f348b859 (patch)
tree68f663199274c403dd85625268bcfa9beda23394 /libc
parent897b7f7d2bfb31cb45cbde6ae2c72f09a5dcbaaf (diff)
downloaduClibc-alpine-defe0a2ced5d3234fb32ceba5fb8bc72f348b859.tar.bz2
uClibc-alpine-defe0a2ced5d3234fb32ceba5fb8bc72f348b859.tar.xz
sh: Align sh clone implementation with glibc
Align sh clone implementation with glibc one that incorporated time ago a patch provided by me slightly modified. The glibc code indeed avoids to load the r3 register if the 2nd function argument is NULL (r5). No functional change. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/sh/clone.S15
1 files changed, 7 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/sh/clone.S b/libc/sysdeps/linux/sh/clone.S
index 4d933a573..bb566276a 100644
--- a/libc/sysdeps/linux/sh/clone.S
+++ b/libc/sysdeps/linux/sh/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,13 +34,12 @@
ENTRY(__clone)
/* sanity check arguments. */
tst r4, r4
- bt 0f
- tst r5, r5
- bf/s 1f
- mov #+SYS_ify(clone), r3
-0:
+ bt/s 0f
+ tst r5, r5
+ bf 1f
+0:
bra .Lsyscall_error
- mov #-EINVAL,r0
+ mov #-EINVAL,r0
1:
/* insert the args onto the new stack */
mov.l r7, @-r5
@@ -52,6 +51,7 @@ ENTRY(__clone)
mov.l @r15, r6
mov.l @(8,r15), r7
mov.l @(4,r15), r0
+ mov #+SYS_ify(clone), r3
trapa #0x15
mov r0, r1
mov #-12, r2
@@ -129,7 +129,6 @@ ENTRY(__clone)
.Ltidoff:
.word TID - TLS_PRE_TCB_SIZE
#endif
-
PSEUDO_END (__clone)
weak_alias (__clone, clone)