futex.h (sys_futex0): Change operand "op" to long.
authorUros Bizjak <ubizjak@gmail.com>
Wed, 27 May 2015 19:35:58 +0000 (21:35 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Wed, 27 May 2015 19:35:58 +0000 (21:35 +0200)
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

libgomp/ChangeLog
libgomp/config/linux/x86/futex.h
libitm/ChangeLog
libitm/config/linux/x86/futex_bits.h

index 07eec068ef3a85ab0095a71aaea0901c6361b3fc..0725c60f596930e4dc2bd872444e3f320243c159 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
+
+       * 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  <cltang@codesourcery.com>
 
        * target.c (gomp_map_pointer): New function abstracting out
index 6c6d317e5959d91387f3a6581c773cc28b8e4d40..7ae36feac7f6117228cbf76c0c515d38ef7166c1 100644 (file)
@@ -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)
 {
index a2b3a152297135a37d605e9a20c6a1a08923806c..91f1dd043926bf05991beb753f822f9b5c22704a 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-27  Uros Bizjak  <ubizjak@gmail.com>
+
+       * 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  <michael.haubenwallner@ssi-schaefer.com>
 
        * Makefile.in: Regenerated with automake-1.11.6.
index 235a053299e12fe60fc9baeff8655830e8ae5b7b..7529fc4606f03affb2b2f7935ee470ba4051f09d 100644 (file)
@@ -46,27 +46,8 @@ sys_futex0 (std::atomic<int> *addr, long op, long val)
 #  define SYS_futex    240
 # endif
 
-# ifdef __PIC__
-
-static inline long
-sys_futex0 (std::atomic<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 (std::atomic<int> *addr, int op, int val)
+sys_futex0 (std::atomic<int> *addr, long op, int val)
 {
   long res;
 
@@ -78,5 +59,4 @@ sys_futex0 (std::atomic<int> *addr, int op, int val)
   return res;
 }
 
-# endif /* __PIC__ */
 #endif /* __x86_64__ */