From 76bcf79c6b64908dc1f8696f25204229084e3aad Mon Sep 17 00:00:00 2001 From: MySQL Build Team Date: Fri, 5 Jun 2009 00:29:41 +0200 Subject: [PATCH] Apply fix for bug#45131, "Problems building on 32-bit linux". As described in the bug, the problem is not new in 5.4, but newly tickled. We need a register whose lower 8 bits can be accessed, and must request such from the assembler. Using a "q" constraint instead of "r" constraint accomplishes this. --- include/atomic/x86-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/atomic/x86-gcc.h b/include/atomic/x86-gcc.h index d79dadbf05e..726c98213fb 100644 --- a/include/atomic/x86-gcc.h +++ b/include/atomic/x86-gcc.h @@ -35,7 +35,7 @@ asm volatile (LOCK "; xadd %0, %1;" : "+r" (v) , "+m" (*a)) #endif #define make_atomic_swap_body(S) \ - asm volatile ("; xchg %0, %1;" : "+r" (v) , "+m" (*a)) + asm volatile ("; xchg %0, %1;" : "+q" (v) , "+m" (*a)) #define make_atomic_cas_body(S) \ asm volatile (LOCK "; cmpxchg %3, %0; setz %2;" \ : "+m" (*a), "+a" (*cmp), "=q" (ret): "r" (set))