aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-13 04:41:39 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-13 04:41:39 +0000
commitb5ec56172d65dd37437846363e742249126d5975 (patch)
tree45d7214a626a6e4a68b4ea838212391ac45478e5
parent7588880f50f551cb60a99e2dd2068fdc170e5435 (diff)
downloadglibc-b5ec56172d65dd37437846363e742249126d5975.tar
glibc-b5ec56172d65dd37437846363e742249126d5975.tar.gz
glibc-b5ec56172d65dd37437846363e742249126d5975.tar.bz2
glibc-b5ec56172d65dd37437846363e742249126d5975.zip
Update.
2003-03-13 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/ia64/sysdep.h (BREAK_INSN_1, BREAK_INSN, ASM_OUTARGS_0, ASM_OUTARGS_1, ASM_OUTARGS_2, ASM_OUTARGS_3, ASM_OUTARGS_4, ASM_OUTARGS_5, ASM_OUTARGS_6): Define. (INTERNAL_SYSCALL, INLINE_SYSCALL): Use it. Make syscall arguments clobbered by the syscall. (ASM_ARGS_1, ASM_ARGS_2, ASM_ARGS_3, ASM_ARGS_4, ASM_ARGS_5, ASM_ARGS_6): Change constraints from r to index of corresponding output register. * sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Swap ptid and ctid to match kernel. * sysdeps/unix/sysv/linux/ia64/system.c (FORK): Likewise. * sysdeps/powerpc/powerpc64/elf/configure.in: Remove * sysdeps/powerpc/powerpc64/elf/configure: Regenerated.
-rw-r--r--ChangeLog18
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/fork.c2
-rw-r--r--sysdeps/unix/sysv/linux/ia64/clone2.S4
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep.h35
-rw-r--r--sysdeps/unix/sysv/linux/ia64/system.c2
6 files changed, 48 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b50fdb284..17f55285a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,22 @@
+2003-03-13 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/unix/sysv/linux/ia64/sysdep.h (BREAK_INSN_1, BREAK_INSN,
+ ASM_OUTARGS_0, ASM_OUTARGS_1, ASM_OUTARGS_2, ASM_OUTARGS_3,
+ ASM_OUTARGS_4, ASM_OUTARGS_5, ASM_OUTARGS_6): Define.
+ (INTERNAL_SYSCALL, INLINE_SYSCALL): Use it. Make syscall arguments
+ clobbered by the syscall.
+ (ASM_ARGS_1, ASM_ARGS_2, ASM_ARGS_3, ASM_ARGS_4, ASM_ARGS_5,
+ ASM_ARGS_6): Change constraints from r to index of corresponding
+ output register.
+ * sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Swap
+ ptid and ctid to match kernel.
+ * sysdeps/unix/sysv/linux/ia64/system.c (FORK): Likewise.
+
2003-03-12 Steven Munroe <sjmunroe@us.ibm.com>
- * sysdeps/powerpc/powerpc64/elf/configure.in: Remove
+ * sysdeps/powerpc/powerpc64/elf/configure.in: Remove
AC_DEFINE(PI_STATIC_AND_HIDDEN). Not supported for PowerPC64.
- * sysdeps/powerpc/powerpc64/elf/configure: Regenerated.
+ * sysdeps/powerpc/powerpc64/elf/configure: Regenerated.
2003-03-11 Roland McGrath <roland@redhat.com>
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 5031d3a8ee..f3bc8e914b 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2003-03-13 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
+ ctid to match kernel.
+
2003-03-12 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/fork.c b/nptl/sysdeps/unix/sysv/linux/ia64/fork.c
index b8d00bd98a..1502310f1d 100644
--- a/nptl/sysdeps/unix/sysv/linux/ia64/fork.c
+++ b/nptl/sysdeps/unix/sysv/linux/ia64/fork.c
@@ -26,6 +26,6 @@
#define ARCH_FORK() \
INLINE_SYSCALL (clone2, 6, \
CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \
- NULL, 0, &THREAD_SELF->tid, NULL, NULL)
+ NULL, 0, NULL, &THREAD_SELF->tid, NULL)
#include "../fork.c"
diff --git a/sysdeps/unix/sysv/linux/ia64/clone2.S b/sysdeps/unix/sysv/linux/ia64/clone2.S
index bdd37ae6ae..17620ff646 100644
--- a/sysdeps/unix/sysv/linux/ia64/clone2.S
+++ b/sysdeps/unix/sysv/linux/ia64/clone2.S
@@ -42,8 +42,8 @@ ENTRY(__clone2)
mov out0=in3 /* Flags are first syscall argument. */
mov out1=in1 /* Stack address. */
mov out2=in2 /* Stack size. */
- mov out3=in7 /* Child TID Pointer */
- mov out4=in5 /* Parent TID Pointer */
+ mov out3=in5 /* Parent TID Pointer */
+ mov out4=in7 /* Child TID Pointer */
mov out5=in6 /* TLS pointer */
DO_CALL (SYS_ify (clone2))
cmp.eq p6,p0=-1,r10
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
index 4522fb9c30..556e266de5 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
@@ -105,6 +105,9 @@
#else /* not __ASSEMBLER__ */
+#define BREAK_INSN_1(num) "break " #num ";;\n\t"
+#define BREAK_INSN(num) BREAK_INSN_1(num)
+
/* On IA-64 we have stacked registers for passing arguments. The
"out" registers end up being the called function's "in"
registers.
@@ -121,10 +124,10 @@
register long _r15 asm ("r15") = __NR_##name; \
long _retval; \
LOAD_ARGS_##nr (args); \
- __asm __volatile ("break %3;;\n\t" \
+ __asm __volatile (BREAK_INSN (__BREAK_SYSCALL) \
: "=r" (_r8), "=r" (_r10), "=r" (_r15) \
- : "i" (__BREAK_SYSCALL), "2" (_r15) \
- ASM_ARGS_##nr \
+ ASM_OUTARGS_##nr \
+ : "2" (_r15) ASM_ARGS_##nr \
: "memory" ASM_CLOBBERS_##nr); \
_retval = _r8; \
if (_r10 == -1) \
@@ -145,10 +148,10 @@
register long _r15 asm ("r15") = __NR_##name; \
long _retval; \
LOAD_ARGS_##nr (args); \
- __asm __volatile ("break %3;;\n\t" \
+ __asm __volatile (BREAK_INSN (__BREAK_SYSCALL) \
: "=r" (_r8), "=r" (_r10), "=r" (_r15) \
- : "i" (__BREAK_SYSCALL), "2" (_r15) \
- ASM_ARGS_##nr \
+ ASM_OUTARGS_##nr \
+ : "2" (_r15) ASM_ARGS_##nr \
: "memory" ASM_CLOBBERS_##nr); \
_retval = _r8; \
err = _r10; \
@@ -180,13 +183,21 @@
register long _out5 asm ("out5") = (long) (out5); \
LOAD_ARGS_5 (out0, out1, out2, out3, out4)
+#define ASM_OUTARGS_0
+#define ASM_OUTARGS_1 ASM_OUTARGS_0, "=r" (_out0)
+#define ASM_OUTARGS_2 ASM_OUTARGS_1, "=r" (_out1)
+#define ASM_OUTARGS_3 ASM_OUTARGS_2, "=r" (_out2)
+#define ASM_OUTARGS_4 ASM_OUTARGS_3, "=r" (_out3)
+#define ASM_OUTARGS_5 ASM_OUTARGS_4, "=r" (_out4)
+#define ASM_OUTARGS_6 ASM_OUTARGS_5, "=r" (_out5)
+
#define ASM_ARGS_0
-#define ASM_ARGS_1 ASM_ARGS_0, "r" (_out0)
-#define ASM_ARGS_2 ASM_ARGS_1, "r" (_out1)
-#define ASM_ARGS_3 ASM_ARGS_2, "r" (_out2)
-#define ASM_ARGS_4 ASM_ARGS_3, "r" (_out3)
-#define ASM_ARGS_5 ASM_ARGS_4, "r" (_out4)
-#define ASM_ARGS_6 ASM_ARGS_5, "r" (_out5)
+#define ASM_ARGS_1 ASM_ARGS_0, "3" (_out0)
+#define ASM_ARGS_2 ASM_ARGS_1, "4" (_out1)
+#define ASM_ARGS_3 ASM_ARGS_2, "5" (_out2)
+#define ASM_ARGS_4 ASM_ARGS_3, "6" (_out3)
+#define ASM_ARGS_5 ASM_ARGS_4, "7" (_out4)
+#define ASM_ARGS_6 ASM_ARGS_5, "8" (_out5)
#define ASM_CLOBBERS_0 ASM_CLOBBERS_1, "out0"
#define ASM_CLOBBERS_1 ASM_CLOBBERS_2, "out1"
diff --git a/sysdeps/unix/sysv/linux/ia64/system.c b/sysdeps/unix/sysv/linux/ia64/system.c
index db4fcfe015..67a09cf232 100644
--- a/sysdeps/unix/sysv/linux/ia64/system.c
+++ b/sysdeps/unix/sysv/linux/ia64/system.c
@@ -35,7 +35,7 @@
#ifdef __ASSUME_CLONE_THREAD_FLAGS
# define FORK() \
INLINE_SYSCALL (clone2, 6, CLONE_PARENT_SETTID | SIGCHLD, NULL, 0, \
- NULL, &pid, NULL)
+ &pid, NULL, NULL)
#endif
static void cancel_handler (void *arg);