mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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)
This commit is contained in:
@@ -47,9 +47,3 @@ IF(HAVE_DECL_SHM_HUGETLB)
|
||||
SET(HAVE_LARGE_PAGE_OPTION 1)
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR MATCHES "86")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686")
|
||||
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -march=i686")
|
||||
ENDIF()
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user