From 4ad2e065e4e750ee5871952b9ef45c2b1dee3672 Mon Sep 17 00:00:00 2001 From: uros Date: Wed, 27 May 2015 19:35:58 +0000 Subject: [PATCH] libgomp/ChangeLog: * config/linux/x86/futex.h (sys_futex0) [!__x86_64__]: Change operand "op" to long. [__PIC__]: Remove sys_futex0 function. libitm/ChangeLog: * config/linux/x86/futex_bits.h (sys_futex0) [!__x86_64__]: Change operand "op" to long. [__PIC__]: Remove sys_futex0 function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223771 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/ChangeLog | 6 ++++++ libgomp/config/linux/x86/futex.h | 23 +---------------------- libitm/ChangeLog | 6 ++++++ libitm/config/linux/x86/futex_bits.h | 22 +--------------------- 4 files changed, 14 insertions(+), 43 deletions(-) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 07eec068ef3..0725c60f596 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,9 @@ +2015-05-27 Uros Bizjak + + * config/linux/x86/futex.h (sys_futex0) [!__x86_64__]: + Change operand "op" to long. + [__PIC__]: Remove sys_futex0 function. + 2015-05-27 Chung-Lin Tang * target.c (gomp_map_pointer): New function abstracting out diff --git a/libgomp/config/linux/x86/futex.h b/libgomp/config/linux/x86/futex.h index 6c6d317e595..7ae36feac7f 100644 --- a/libgomp/config/linux/x86/futex.h +++ b/libgomp/config/linux/x86/futex.h @@ -81,27 +81,8 @@ futex_wake (int *addr, int count) # define SYS_futex 240 # endif -# ifdef __PIC__ - static inline long -sys_futex0 (int *addr, int op, int val) -{ - long res; - - __asm volatile ("xchgl\t%%ebx, %2\n\t" - "int\t$0x80\n\t" - "xchgl\t%%ebx, %2" - : "=a" (res) - : "0"(SYS_futex), "r" (addr), "c"(op), - "d"(val), "S"(0) - : "memory"); - return res; -} - -# else - -static inline long -sys_futex0 (int *addr, int op, int val) +sys_futex0 (int *addr, long op, int val) { long res; @@ -113,8 +94,6 @@ sys_futex0 (int *addr, int op, int val) return res; } -# endif /* __PIC__ */ - static inline void futex_wait (int *addr, int val) { diff --git a/libitm/ChangeLog b/libitm/ChangeLog index a2b3a152297..91f1dd04392 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,3 +1,9 @@ +2015-05-27 Uros Bizjak + + * config/linux/x86/futex_bits.h (sys_futex0) [!__x86_64__]: + Change operand "op" to long. + [__PIC__]: Remove sys_futex0 function. + 2015-05-13 Michael Haubenwallner * Makefile.in: Regenerated with automake-1.11.6. diff --git a/libitm/config/linux/x86/futex_bits.h b/libitm/config/linux/x86/futex_bits.h index 235a053299e..7529fc4606f 100644 --- a/libitm/config/linux/x86/futex_bits.h +++ b/libitm/config/linux/x86/futex_bits.h @@ -46,27 +46,8 @@ sys_futex0 (std::atomic *addr, long op, long val) # define SYS_futex 240 # endif -# ifdef __PIC__ - -static inline long -sys_futex0 (std::atomic *addr, int op, int val) -{ - long res; - - __asm volatile ("xchgl\t%%ebx, %2\n\t" - "int\t$0x80\n\t" - "xchgl\t%%ebx, %2" - : "=a" (res) - : "0"(SYS_futex), "r" (addr), "c"(op), - "d"(val), "S"(0) - : "memory"); - return res; -} - -# else - static inline long -sys_futex0 (std::atomic *addr, int op, int val) +sys_futex0 (std::atomic *addr, long op, int val) { long res; @@ -78,5 +59,4 @@ sys_futex0 (std::atomic *addr, int op, int val) return res; } -# endif /* __PIC__ */ #endif /* __x86_64__ */ -- 2.11.4.GIT