+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
# 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;
return res;
}
-# endif /* __PIC__ */
-
static inline void
futex_wait (int *addr, int val)
{
+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.
# 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;
return res;
}
-# endif /* __PIC__ */
#endif /* __x86_64__ */