summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/os/Linux.cmake6
-rw-r--r--include/atomic/x86-gcc.h6
2 files changed, 3 insertions, 9 deletions
diff --git a/cmake/os/Linux.cmake b/cmake/os/Linux.cmake
index 108e06cf7b0..36d7ade66a7 100644
--- a/cmake/os/Linux.cmake
+++ b/cmake/os/Linux.cmake
@@ -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()
-
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