If 64-bit atomic ops are unavailable (i.e. 32-bit platform with -march=i486 or less), then MySQL will use an inline asm implementation. I believe that the upstream implementation is buggy due to incorrect asm constraints (http://bugs.mysql.com/bug.php?id=63451), and I attempted to fix it for Percona Server in bug 803865 and bug 878022.
But the fixed version starves the compiler from registers and compilations might ICE, depending on the code context.
We should revert all the fixes and add #error in front of make_atomic_cas_body_64, effectively requiring compilation with -march=i586 at least. Which is a much more reasonable and less effort requiring way to solve these issues.
If 64-bit atomic ops are unavailable (i.e. 32-bit platform with -march=i486 or less), then MySQL will use an inline asm implementation. I believe that the upstream implementation is buggy due to incorrect asm constraints (http:// bugs.mysql. com/bug. php?id= 63451), and I attempted to fix it for Percona Server in bug 803865 and bug 878022.
But the fixed version starves the compiler from registers and compilations might ICE, depending on the code context.
We should revert all the fixes and add #error in front of make_atomic_ cas_body_ 64, effectively requiring compilation with -march=i586 at least. Which is a much more reasonable and less effort requiring way to solve these issues.