aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/unix')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S18
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S12
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S21
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S12
5 files changed, 29 insertions, 45 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
index 3195db2..018da0c 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -68,10 +68,6 @@
#endif
-/* For the calculation see asm/vsyscall.h. */
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
-
-
.globl __lll_lock_wait_private
.type __lll_lock_wait_private,@function
.hidden __lll_lock_wait_private
@@ -250,10 +246,9 @@ __lll_timedlock_wait:
/* Get current time. */
movq %rsp, %rdi
xorl %esi, %esi
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
- /* This is a regular function call, all caller-save registers
- might be clobbered. */
- callq *%rax
+ /* This call works because we directly jump to a system call entry
+ which preserves all the registers. */
+ call JUMPTARGET(__gettimeofday)
/* Compute relative timeout. */
movq 8(%rsp), %rax
@@ -402,8 +397,9 @@ __lll_timedwait_tid:
/* Get current time. */
2: movq %rsp, %rdi
xorl %esi, %esi
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
- callq *%rax
+ /* This call works because we directly jump to a system call entry
+ which preserves all the registers. */
+ call JUMPTARGET(__gettimeofday)
/* Compute relative timeout. */
movq 8(%rsp), %rax
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
index 5218a4f..b7b8b34 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002=2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2011=2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -50,9 +50,6 @@
orl $FUTEX_WAIT_BITSET | FUTEX_CLOCK_REALTIME, reg
#endif
-/* For the calculation see asm/vsyscall.h. */
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
-
.globl __lll_robust_lock_wait
.type __lll_robust_lock_wait,@function
@@ -219,10 +216,9 @@ __lll_robust_timedlock_wait:
/* Get current time. */
movq %rsp, %rdi
xorl %esi, %esi
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
- /* This is a regular function call, all caller-save registers
- might be clobbered. */
- callq *%rax
+ /* This call works because we directly jump to a system call entry
+ which preserves all the registers. */
+ call JUMPTARGET(__gettimeofday)
/* Compute relative timeout. */
movq 8(%rsp), %rax
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
index 48ea8b9..d11b297 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
@@ -26,9 +26,6 @@
#include <kernel-features.h>
-/* For the calculation see asm/vsyscall.h. */
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
-
.text
@@ -453,13 +450,11 @@ __pthread_cond_timedwait:
movq __vdso_clock_gettime@GOTPCREL(%rip), %rax
movq (%rax), %rax
PTR_DEMANGLE (%rax)
- jz 26f
call *%rax
- jmp 27f
-# endif
-26: movl $__NR_clock_gettime, %eax
+# else
+ movl $__NR_clock_gettime, %eax
syscall
-27:
+# endif
# ifndef __ASSUME_POSIX_TIMERS
cmpq $-ENOSYS, %rax
je 19f
@@ -473,8 +468,9 @@ __pthread_cond_timedwait:
# else
leaq 24(%rsp), %rdi
xorl %esi, %esi
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
- callq *%rax
+ /* This call works because we directly jump to a system call entry
+ which preserves all the registers. */
+ call JUMPTARGET(__gettimeofday)
/* Compute relative timeout. */
movq 40(%rsp), %rax
@@ -611,8 +607,9 @@ __pthread_cond_timedwait:
/* clock_gettime not available. */
19: leaq 32(%rsp), %rdi
xorl %esi, %esi
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
- callq *%rax
+ /* This call works because we directly jump to a system call entry
+ which preserves all the registers. */
+ call JUMPTARGET(__gettimeofday)
/* Compute relative timeout. */
movq 40(%rsp), %rax
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
index f5d055c..0e6a6ee 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2005,2007,2009,2010,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -23,10 +23,6 @@
#include <pthread-errnos.h>
#include <kernel-features.h>
-
-/* For the calculation see asm/vsyscall.h. */
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
-
.text
.globl pthread_rwlock_timedrdlock
@@ -123,8 +119,9 @@ pthread_rwlock_timedrdlock:
/* Get current time. */
movq %rsp, %rdi
xorl %esi, %esi
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
- callq *%rax
+ /* This call works because we directly jump to a system call entry
+ which preserves all the registers. */
+ call JUMPTARGET(__gettimeofday)
/* Compute relative timeout. */
movq 8(%rsp), %rax
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
index 6ed8b49..16bf920 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 2002, 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005, 2007, 2009, 2010, 2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -23,10 +24,6 @@
#include <pthread-errnos.h>
#include <kernel-features.h>
-
-/* For the calculation see asm/vsyscall.h. */
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
-
.text
.globl pthread_rwlock_timedwrlock
@@ -120,8 +117,9 @@ pthread_rwlock_timedwrlock:
/* Get current time. */
movq %rsp, %rdi
xorl %esi, %esi
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
- callq *%rax
+ /* This call works because we directly jump to a system call entry
+ which preserves all the registers. */
+ call JUMPTARGET(__gettimeofday)
/* Compute relative timeout. */
movq 8(%rsp), %rax