@@ -343,34 +343,34 @@ __atomic_compare_exchange_n(&tmp, &old, 1, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED
343
343
__atomic_add_fetch(&tmp, 1, __ATOMIC_RELAXED);
344
344
__atomic_compare_exchange_n(&tmp64, &old64, 1, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
345
345
__atomic_add_fetch(&tmp64, 1, __ATOMIC_RELAXED);] ) ] ,
346
- [ opal_cv_have___atomic=yes] ,
347
- [ opal_cv_have___atomic=no] )
346
+ [ opal_cv_have___atomic=yes] ,
347
+ [ opal_cv_have___atomic=no] )
348
348
349
349
AC_MSG_RESULT ( [ $opal_cv_have___atomic] )
350
350
351
351
if test $opal_cv_have___atomic = "yes" ; then
352
- AC_MSG_CHECKING ( [ for 64-bit GCC built-in atomics] )
352
+ AC_MSG_CHECKING ( [ for 64-bit GCC built-in atomics] )
353
353
354
- AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [
354
+ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [
355
355
#include <stdint.h>
356
356
uint64_t tmp64, old64 = 0;] , [
357
357
__atomic_compare_exchange_n(&tmp64, &old64, 1, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
358
358
__atomic_add_fetch(&tmp64, 1, __ATOMIC_RELAXED);] ) ] ,
359
- [ opal_cv_have___atomic_64=yes] ,
360
- [ opal_cv_have___atomic_64=no] )
361
-
362
- AC_MSG_RESULT ( [ $opal_cv_have___atomic_64] )
363
-
364
- if test $opal_cv_have___atomic_64 = "yes" ; then
365
- AC_MSG_CHECKING ( [ if 64-bit GCC built-in atomics are lock-free] )
366
- AC_RUN_IFELSE ( [ AC_LANG_PROGRAM ( [ ] , [ if (!__atomic_is_lock_free (8, 0)) { return 1; }] ) ] ,
367
- [ AC_MSG_RESULT ( [ yes] ) ] ,
368
- [ AC_MSG_RESULT ( [ no] )
369
- opal_cv_have___atomic_64=no] ,
370
- [ AC_MSG_RESULT ( [ cannot test -- assume yes (cross compiling)] ) ] )
371
- fi
359
+ [ opal_cv_have___atomic_64=yes] ,
360
+ [ opal_cv_have___atomic_64=no] )
361
+
362
+ AC_MSG_RESULT ( [ $opal_cv_have___atomic_64] )
363
+
364
+ if test $opal_cv_have___atomic_64 = "yes" ; then
365
+ AC_MSG_CHECKING ( [ if 64-bit GCC built-in atomics are lock-free] )
366
+ AC_RUN_IFELSE ( [ AC_LANG_PROGRAM ( [ ] , [ if (!__atomic_is_lock_free (8, 0)) { return 1; }] ) ] ,
367
+ [ AC_MSG_RESULT ( [ yes] ) ] ,
368
+ [ AC_MSG_RESULT ( [ no] )
369
+ opal_cv_have___atomic_64=no] ,
370
+ [ AC_MSG_RESULT ( [ cannot test -- assume yes (cross compiling)] ) ] )
371
+ fi
372
372
else
373
- opal_cv_have___atomic_64=no
373
+ opal_cv_have___atomic_64=no
374
374
fi
375
375
376
376
# Check for 128-bit support
@@ -1060,40 +1060,40 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
1060
1060
AC_MSG_WARN ( [ C11 atomics were requested but are not supported] )
1061
1061
AC_MSG_ERROR ( [ Cannot continue] )
1062
1062
elif test "$enable_builtin_atomics" = "yes" ; then
1063
- if test $opal_cv_have___atomic = "yes" ; then
1064
- opal_cv_asm_builtin="BUILTIN_GCC"
1065
- else
1066
- AC_MSG_WARN ( [ GCC built-in atomics requested but not found.] )
1067
- AC_MSG_ERROR ( [ Cannot continue] )
1068
- fi
1063
+ if test $opal_cv_have___atomic = "yes" ; then
1064
+ opal_cv_asm_builtin="BUILTIN_GCC"
1065
+ else
1066
+ AC_MSG_WARN ( [ GCC built-in atomics requested but not found.] )
1067
+ AC_MSG_ERROR ( [ Cannot continue] )
1068
+ fi
1069
1069
fi
1070
1070
1071
- OPAL_CHECK_ASM_PROC
1072
- OPAL_CHECK_ASM_TEXT
1073
- OPAL_CHECK_ASM_GLOBAL
1074
- OPAL_CHECK_ASM_GNU_STACKEXEC
1075
- OPAL_CHECK_ASM_LABEL_SUFFIX
1076
- OPAL_CHECK_ASM_GSYM
1077
- OPAL_CHECK_ASM_LSYM
1078
- OPAL_CHECK_ASM_TYPE
1079
- OPAL_CHECK_ASM_SIZE
1080
- OPAL_CHECK_ASM_ALIGN_LOG
1081
-
1082
- # find our architecture for purposes of assembly stuff
1083
- opal_cv_asm_arch="UNSUPPORTED"
1084
- OPAL_GCC_INLINE_ASSIGN=""
1085
-
1086
- case "${host}" in
1071
+ OPAL_CHECK_ASM_PROC
1072
+ OPAL_CHECK_ASM_TEXT
1073
+ OPAL_CHECK_ASM_GLOBAL
1074
+ OPAL_CHECK_ASM_GNU_STACKEXEC
1075
+ OPAL_CHECK_ASM_LABEL_SUFFIX
1076
+ OPAL_CHECK_ASM_GSYM
1077
+ OPAL_CHECK_ASM_LSYM
1078
+ OPAL_CHECK_ASM_TYPE
1079
+ OPAL_CHECK_ASM_SIZE
1080
+ OPAL_CHECK_ASM_ALIGN_LOG
1081
+
1082
+ # find our architecture for purposes of assembly stuff
1083
+ opal_cv_asm_arch="UNSUPPORTED"
1084
+ OPAL_GCC_INLINE_ASSIGN=""
1085
+
1086
+ case "${host}" in
1087
1087
x86_64-*x32|i?86-*|x86_64*|amd64*)
1088
1088
if test "$ac_cv_sizeof_long" = "4" ; then
1089
- if test $opal_cv_asm_builtin = BUILTIN_NO ; then
1090
- AC_MSG_ERROR ( [ IA32 atomics are no longer supported. Use a C11 compiler] )
1091
- fi
1092
- opal_cv_asm_arch="IA32"
1093
- else
1094
- opal_cv_asm_arch="X86_64"
1095
- OPAL_CHECK_CMPXCHG16B
1096
- fi
1089
+ if test $opal_cv_asm_builtin = BUILTIN_NO ; then
1090
+ AC_MSG_ERROR ( [ IA32 atomics are no longer supported. Use a C11 compiler] )
1091
+ fi
1092
+ opal_cv_asm_arch="IA32"
1093
+ else
1094
+ opal_cv_asm_arch="X86_64"
1095
+ OPAL_CHECK_CMPXCHG16B
1096
+ fi
1097
1097
OPAL_GCC_INLINE_ASSIGN='"xaddl %1,%0" : "=m"(ret), "+r"(negone) : "m"(ret)'
1098
1098
;;
1099
1099
@@ -1104,8 +1104,8 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
1104
1104
1105
1105
armv7*|arm-*-linux-gnueabihf|armv6*)
1106
1106
if test $opal_cv_asm_builtin = BUILTIN_NO ; then
1107
- AC_MSG_ERROR ( [ 32-bit ARM atomics are no longer supported. Use a C11 compiler] )
1108
- fi
1107
+ AC_MSG_ERROR ( [ 32-bit ARM atomics are no longer supported. Use a C11 compiler] )
1108
+ fi
1109
1109
1110
1110
opal_cv_asm_arch="ARM"
1111
1111
OPAL_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
@@ -1114,11 +1114,11 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
1114
1114
powerpc-*|powerpc64-*|powerpcle-*|powerpc64le-*|rs6000-*|ppc-*)
1115
1115
OPAL_CHECK_POWERPC_REG
1116
1116
if test "$ac_cv_sizeof_long" = "4" ; then
1117
- if test $opal_cv_asm_builtin = BUILTIN_NO ; then
1118
- AC_MSG_ERROR ( [ PowerPC 32-bit atomics are no longer supported. Use a C11 compiler] )
1119
- fi
1120
- opal_cv_asm_arch="POWERPC32"
1121
- elif test "$ac_cv_sizeof_long" = "8" ; then
1117
+ if test $opal_cv_asm_builtin = BUILTIN_NO ; then
1118
+ AC_MSG_ERROR ( [ PowerPC 32-bit atomics are no longer supported. Use a C11 compiler] )
1119
+ fi
1120
+ opal_cv_asm_arch="POWERPC32"
1121
+ elif test "$ac_cv_sizeof_long" = "8" ; then
1122
1122
opal_cv_asm_arch="POWERPC64"
1123
1123
else
1124
1124
AC_MSG_ERROR ( [ Could not determine PowerPC word size: $ac_cv_sizeof_long] )
@@ -1138,18 +1138,18 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
1138
1138
1139
1139
;;
1140
1140
*)
1141
- if test $opal_cv_have___atomic = "yes" ; then
1142
- opal_cv_asm_builtin="BUILTIN_GCC"
1143
- else
1144
- AC_MSG_ERROR ( [ No atomic primitives available for $host] )
1145
- fi
1146
- ;;
1147
- esac
1141
+ if test $opal_cv_have___atomic = "yes" ; then
1142
+ opal_cv_asm_builtin="BUILTIN_GCC"
1143
+ else
1144
+ AC_MSG_ERROR ( [ No atomic primitives available for $host] )
1145
+ fi
1146
+ ;;
1147
+ esac
1148
1148
1149
- if test "$opal_cv_asm_builtin" = "BUILTIN_GCC" ; then
1149
+ if test "$opal_cv_asm_builtin" = "BUILTIN_GCC" ; then
1150
1150
AC_DEFINE ( [ OPAL_C_GCC_INLINE_ASSEMBLY] , [ 1] ,
1151
- [ Whether C compiler supports GCC style inline assembly] )
1152
- else
1151
+ [ Whether C compiler supports GCC style inline assembly] )
1152
+ else
1153
1153
opal_cv_asm_inline_supported="no"
1154
1154
# now that we know our architecture, try to inline assemble
1155
1155
OPAL_CHECK_INLINE_C_GCC([ $OPAL_GCC_INLINE_ASSIGN] )
@@ -1219,7 +1219,7 @@ int main(int argc, char* argv[])
1219
1219
[ Whether to use builtin atomics] )
1220
1220
AC_SUBST ( [ OPAL_ASSEMBLY_BUILTIN] )
1221
1221
1222
- OPAL_SUMMARY_ADD([ [ Atomics ] ] ,[ [ OMPI ] ] ,[ ] ,[ $opal_cv_asm_builtin] )
1222
+ OPAL_SUMMARY_ADD([ [ Miscellaneous ] ] ,[ [ Atomics ] ] ,[ ] ,[ $opal_cv_asm_builtin] )
1223
1223
1224
1224
OPAL_ASM_FIND_FILE
1225
1225
0 commit comments