From: Uros Bizjak Date: Wed, 27 May 2015 19:35:58 +0000 (+0200) Subject: futex.h (sys_futex0): Change operand "op" to long. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ea023bcfd8a6549df22232792038310fd4f2f967;p=gcc.git futex.h (sys_futex0): Change operand "op" to long. 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. From-SVN: r223771 --- 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__ */