diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-05-07 18:28:36 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-05-07 18:28:36 +0200 |
commit | 009dee833c94ebcf7199514f32baf3f4530d92f0 (patch) | |
tree | 9ce2c0e26aca30949e28011c996839f8837cbfa1 /include/atomic | |
parent | e0a08c567a028db406ebf69ece8b3210cba2af0c (diff) | |
download | mariadb-git-009dee833c94ebcf7199514f32baf3f4530d92f0.tar.gz |
centos5 gcc 4.1 asm bug
include/atomic/x86-gcc.h:
force %esi register, don't give gcc a choice.
(otherwise it could choose %ebx, and 4.1 did)
Diffstat (limited to 'include/atomic')
-rw-r--r-- | include/atomic/x86-gcc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/atomic/x86-gcc.h b/include/atomic/x86-gcc.h index 2238347d419..173e32e790c 100644 --- a/include/atomic/x86-gcc.h +++ b/include/atomic/x86-gcc.h @@ -124,10 +124,10 @@ asm volatile ("push %%ebx;" \ "movl (%%ecx), %%ebx;" \ "movl 4(%%ecx), %%ecx;" \ - LOCK_prefix "; cmpxchg8b %0;" \ + LOCK_prefix "; cmpxchg8b (%%esi);" \ "setz %2; pop %%ebx" \ - : "=m" (*a), "+A" (*cmp), "=c" (ret) \ - : "c" (&set), "m" (*a) \ + : "+S" (a), "+A" (*cmp), "=c" (ret) \ + : "c" (&set) \ : "memory", "esp") #endif |