Skip to content

Commit

Permalink
TS-1746: disable 128bit compare and swap
Browse files Browse the repository at this point in the history
Disable the use of 128bit compare and swap that was introduced in
TS-1742. That change was causing crashes in the freelist.
  • Loading branch information
jpeach committed Mar 21, 2013
1 parent 57ffdf5 commit bd8fd4f
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions configure.ac
Expand Up @@ -1108,31 +1108,33 @@ AC_SUBST(need_union_semun)
AC_MSG_CHECKING(for 128bit CAS support) AC_MSG_CHECKING(for 128bit CAS support)
AC_LANG_PUSH([C++]) AC_LANG_PUSH([C++])


TS_TRY_COMPILE_NO_WARNING([],[ dnl TS_TRY_COMPILE_NO_WARNING([],[
__int128_t x = 0; dnl __int128_t x = 0;
__sync_bool_compare_and_swap(&x,0,10); dnl __sync_bool_compare_and_swap(&x,0,10);
], [ dnl ], [
AC_MSG_RESULT(yes) dnl AC_MSG_RESULT(yes)
has_128bit_cas=1 dnl has_128bit_cas=1
], [ dnl ], [
dnl If 128bit CAS fails, try again with the -mcx16 option. GCC needs this; dnl dnl If 128bit CAS fails, try again with the -mcx16 option. GCC needs this;
dnl clang doesn't; icc is unknown but presumed sane. dnl dnl clang doesn't; icc is unknown but presumed sane.
__saved_CXXFLAGS="${CXXFLAGS}" dnl __saved_CXXFLAGS="${CXXFLAGS}"
TS_ADDTO(CXXFLAGS, [-mcx16]) dnl TS_ADDTO(CXXFLAGS, [-mcx16])
TS_TRY_COMPILE_NO_WARNING([],[ dnl TS_TRY_COMPILE_NO_WARNING([],[
__int128_t x = 0; dnl __int128_t x = 0;
__sync_bool_compare_and_swap(&x,0,10); dnl __sync_bool_compare_and_swap(&x,0,10);
], [ dnl ], [
AC_MSG_RESULT(yes) dnl AC_MSG_RESULT(yes)
has_128bit_cas=1 dnl has_128bit_cas=1
dnl Keep CFLAGS and CXXFLAGS in sync. dnl dnl Keep CFLAGS and CXXFLAGS in sync.
TS_ADDTO(CFLAGS, [-mcx16]) dnl TS_ADDTO(CFLAGS, [-mcx16])
], [ dnl ], [
AC_MSG_RESULT(no) dnl AC_MSG_RESULT(no)
has_128bit_cas=0 dnl has_128bit_cas=0
CXXFLAGS="${__saved_CXXFLAGS}" dnl CXXFLAGS="${__saved_CXXFLAGS}"
]) dnl ])
]) dnl ])

has_128bit_cas=0


AC_LANG_POP AC_LANG_POP
AC_SUBST(has_128bit_cas) AC_SUBST(has_128bit_cas)
Expand Down

0 comments on commit bd8fd4f

Please sign in to comment.