From a358c805300e358e30d4788a6f19c69988623a5c Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 4 Apr 2017 16:00:27 -0300 Subject: Remove CALL_THREAD_FCT macro This patch removes CALL_THREAD_FCT macro usage and its defition for x86. For 32 bits it usage is only for force 16 stack alignment, however stack is already explicit aligned in clone syscall. For 64 bits and x32 it just a function call and there is no need to code it with inline assembly. Checked on i686-linux-gnu, x86_64-linux-gnu, and x86_64-linux-gnu-x32. * nptl/pthread_create.c (START_THREAD_DEFN): Remove CALL_THREAD_FCT macro usage. * sysdeps/i386/nptl/tls.h (CALL_THREAD_FCT): Remove definition. * sysdeps/x86_64/nptl/tls.h (CALL_THREAD_FCT): Likewise. * sysdeps/x86_64/32/nptl/tls.h: Remove file. --- sysdeps/x86_64/nptl/tls.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'sysdeps/x86_64/nptl') diff --git a/sysdeps/x86_64/nptl/tls.h b/sysdeps/x86_64/nptl/tls.h index 53b41bc84f..9b8ad82550 100644 --- a/sysdeps/x86_64/nptl/tls.h +++ b/sysdeps/x86_64/nptl/tls.h @@ -326,18 +326,6 @@ typedef struct abort (); }) -# define CALL_THREAD_FCT(descr) \ - ({ void *__res; \ - asm volatile ("movq %%fs:%P2, %%rdi\n\t" \ - "callq *%%fs:%P1" \ - : "=a" (__res) \ - : "i" (offsetof (struct pthread, start_routine)), \ - "i" (offsetof (struct pthread, arg)) \ - : "di", "si", "cx", "dx", "r8", "r9", "r10", "r11", \ - "memory", "cc"); \ - __res; }) - - /* Set the stack guard field in TCB head. */ # define THREAD_SET_STACK_GUARD(value) \ THREAD_SETMEM (THREAD_SELF, header.stack_guard, value) -- cgit 1.4.1