summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/bfin/clone.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-09-15 11:02:36 +0000
committerMike Frysinger <vapier@gentoo.org>2007-09-15 11:02:36 +0000
commit783107dbed9ac48f3db147f4ed6cf7a9aa75418e (patch)
treea0e081576d4a86660127740fb6cfde88ebd0aa32 /libc/sysdeps/linux/bfin/clone.c
parentf032afc5fd03f45ecc346b1dbb00b9b3dc0e0e2a (diff)
use gcc input constraints to avoid often duplicated reloads when making syscalls
Diffstat (limited to 'libc/sysdeps/linux/bfin/clone.c')
-rw-r--r--libc/sysdeps/linux/bfin/clone.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/libc/sysdeps/linux/bfin/clone.c b/libc/sysdeps/linux/bfin/clone.c
index 0ba1d5a4a..899738e2d 100644
--- a/libc/sysdeps/linux/bfin/clone.c
+++ b/libc/sysdeps/linux/bfin/clone.c
@@ -19,11 +19,7 @@ clone (int (*fn)(void *arg), void *child_stack, int flags, void *arg, ...)
#ifdef __BFIN_FDPIC__
__asm__ __volatile__ (
- "r1 = %2;"
- "r0 = %3;"
- "P0 = %1;"
"excpt 0;" /*Call sys_clone*/
- "%0 = r0;"
"cc = r0 == 0;"
"if !cc jump .Lxxx;" /* if (rval != 0) skip to parent */
"r0 = %4;"
@@ -35,16 +31,12 @@ clone (int (*fn)(void *arg), void *child_stack, int flags, void *arg, ...)
"p0 = %6;"
"excpt 0;" /* Call sys_exit */
".Lxxx: nop;"
- : "=d" (rval)
- : "i" (__NR_clone), "a" (child_stack), "a" (flags), "a" (arg), "a" (fn), "i" (__NR_exit)
- : "CC", "R0", "R1", "P0");
+ : "=q0" (rval)
+ : "qA" (__NR_clone), "q1" (child_stack), "q0" (flags), "a" (arg), "a" (fn), "i" (__NR_exit)
+ : "CC");
#else
__asm__ __volatile__ (
- "r1 = %2;"
- "r0 = %3;"
- "P0 = %1;"
"excpt 0;" /*Call sys_clone*/
- "%0 = r0;"
"cc = r0 == 0;"
"if !cc jump .Lxxx;" /* if (rval != 0) skip to parent */
"r0 = %4;"
@@ -54,9 +46,9 @@ clone (int (*fn)(void *arg), void *child_stack, int flags, void *arg, ...)
"p0 = %6;"
"excpt 0;" /* Call sys_exit */
".Lxxx: nop;"
- : "=d" (rval)
- : "i" (__NR_clone), "a" (child_stack), "a" (flags), "a" (arg), "a" (fn), "i" (__NR_exit)
- : "CC", "R0", "R1", "P0");
+ : "=q0" (rval)
+ : "qA" (__NR_clone), "q1" (child_stack), "q0" (flags), "a" (arg), "a" (fn), "i" (__NR_exit)
+ : "CC");
#endif
} else {