Explorar o código

Simplify edx:eax access

Samuel Thibault %!s(int64=5) %!d(string=hai) anos
pai
achega
b6d79a0bd8
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      include/starpu_util.h

+ 2 - 4
include/starpu_util.h

@@ -392,12 +392,10 @@ static __starpu_inline unsigned long starpu_xchgl(unsigned long *ptr, unsigned l
 #if defined(__i386__)
 static __starpu_inline uint64_t starpu_cmpxchg64(uint64_t *ptr, uint64_t old, uint64_t next)
 {
-	uint32_t old_hi = old >> 32;
-	uint32_t old_lo = old & 0xfffffffful;
 	uint32_t next_hi = next >> 32;
 	uint32_t next_lo = next & 0xfffffffful;
-	__asm__ __volatile__("lock cmpxchg8b %2": "+d" (old_hi), "+a" (old_lo), "+m" (*ptr) : "c" (next_hi), "b" (next_lo) : "memory");
-	return ((uint64_t) old_hi << 32) | old_lo;
+	__asm__ __volatile__("lock cmpxchg8b %1": "+A" (old), "+m" (*ptr) : "c" (next_hi), "b" (next_lo) : "memory");
+	return old;
 }
 #define STARPU_HAVE_CMPXCHG64
 #endif