From 9e5c9dcd57e80cd56c47fd2bf11de8d167176a0e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 Sep 2011 00:14:06 -0400 Subject: Remove gettimeofday vsyscall use from x86-86 libpthread --- nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S') 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 , 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 -- cgit v1.1