Message ID | 5398C005.3050803@tilera.com |
---|---|
State | New |
Headers | show |
> Something like this?
Assuming C tail calls to PLT functions really don't ever touch the stack on
Tile machines (as on AArch64), then that looks perfect.
On 6/11/2014 4:53 PM, Roland McGrath wrote: >> Something like this? > Assuming C tail calls to PLT functions really don't ever touch the stack on > Tile machines (as on AArch64), then that looks perfect. Yes, the pthread __vfork function is just a single jump to __libc_vfork via the PLT.
diff --git a/sysdeps/unix/sysv/linux/tile/pt-vfork.S b/sysdeps/unix/sysv/linux/tile/pt-vfork.S deleted file mode 100644 index a6ccb1f..0000000 --- a/sysdeps/unix/sysv/linux/tile/pt-vfork.S +++ /dev/null @@ -1,2 +0,0 @@ -#define PT_VFORK 1 /* pid is never zero */ -#include "vfork.S" diff --git a/sysdeps/unix/sysv/linux/tile/pt-vfork.c b/sysdeps/unix/sysv/linux/tile/pt-vfork.c new file mode 100644 index 0000000..5fbc652 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/pt-vfork.c @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/linux/aarch64/pt-vfork.c> diff --git a/sysdeps/unix/sysv/linux/tile/vfork.S b/sysdeps/unix/sysv/linux/tile/vfork.S index 014cccf..bf7bdf4 100644 --- a/sysdeps/unix/sysv/linux/tile/vfork.S +++ b/sysdeps/unix/sysv/linux/tile/vfork.S @@ -38,9 +38,7 @@ ENTRY (__vfork) shli r13, r13, 31 /* Build 0x80000000. */ } sub r12, zero, r12 /* Negate it. */ -#ifndef PT_VFORK CMOVEQZ r12, r12, r13 /* Replace zero pids. */ -#endif ST4 r11, r12 /* Store the temporary PID. */ { @@ -67,9 +65,7 @@ ENTRY (__vfork) CMPEQ r13, r12, r12 /* Test for that value. */ sub r12, zero, r12 /* Re-negate it. */ } -#ifndef PT_VFORK CMOVNEZ r12, r13, zero /* Replace zero pids. */ -#endif ST4 r11, r12 /* Restore the PID. */ 1: BNEZ r1, 0f @@ -78,3 +74,4 @@ PSEUDO_END (__vfork) libc_hidden_def (__vfork) weak_alias (__vfork, vfork) +strong_alias (__vfork, __libc_vfork)