diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-03-13 04:41:39 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-03-13 04:41:39 +0000 |
commit | b5ec56172d65dd37437846363e742249126d5975 (patch) | |
tree | 45d7214a626a6e4a68b4ea838212391ac45478e5 /sysdeps/unix | |
parent | 7588880f50f551cb60a99e2dd2068fdc170e5435 (diff) | |
download | glibc-b5ec56172d65dd37437846363e742249126d5975.tar.gz glibc-b5ec56172d65dd37437846363e742249126d5975.tar.xz 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.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/ia64/clone2.S | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/ia64/sysdep.h | 35 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/ia64/system.c | 2 |
3 files changed, 26 insertions, 15 deletions
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); |