@@ -880,53 +880,6 @@ AC_DEFUN([OPAL_CHECK_POWERPC_REG],[
880
880
[ Whether r notation is used for ppc registers] )
881
881
] ) dnl
882
882
883
-
884
- dnl #################################################################
885
- dnl
886
- dnl OPAL_CHECK_POWERPC_64BIT
887
- dnl
888
- dnl On some powerpc chips (the PPC970 or G5), the OS usually runs in
889
- dnl 32 bit mode, even though the hardware can do 64bit things. If
890
- dnl the compiler will let us, emit code for 64bit test and set type
891
- dnl operations (on a long long).
892
- dnl
893
- dnl #################################################################
894
- AC_DEFUN ( [ OPAL_CHECK_POWERPC_64BIT] ,[
895
- if test "$ac_cv_sizeof_long" != "4" ; then
896
- # this function should only be called in the 32 bit case
897
- AC_MSG_ERROR ( [ CHECK_POWERPC_64BIT called on 64 bit platform. Internal error.] )
898
- fi
899
- AC_MSG_CHECKING ( [ for 64-bit PowerPC assembly support] )
900
- case $host in
901
- *-darwin*)
902
- ppc64_result=0
903
- if test "$opal_cv_asm_powerpc_r_reg" = "1" ; then
904
- ldarx_asm=" ldarx r1,r1,r1";
905
- else
906
- ldarx_asm=" ldarx 1,1,1";
907
- fi
908
- OPAL_TRY_ASSEMBLE([ $opal_cv_asm_text
909
- $ldarx_asm] ,
910
- [ ppc64_result=1] ,
911
- [ ppc64_result=0] )
912
- ;;
913
- *)
914
- ppc64_result=0
915
- ;;
916
- esac
917
-
918
- if test "$ppc64_result" = "1" ; then
919
- AC_MSG_RESULT ( [ yes] )
920
- ifelse ( [ $1 ] ,,: ,[ $1 ] )
921
- else
922
- AC_MSG_RESULT ( [ no] )
923
- ifelse ( [ $2 ] ,,: ,[ $2 ] )
924
- fi
925
-
926
- unset ppc64_result ldarx_asm
927
- ] ) dnl
928
-
929
-
930
883
dnl #################################################################
931
884
dnl
932
885
dnl OPAL_CHECK_CMPXCHG16B
@@ -1108,7 +1061,7 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
1108
1061
AC_MSG_ERROR ( [ Cannot continue] )
1109
1062
elif test "$enable_builtin_atomics" = "yes" ; then
1110
1063
if test $opal_cv_have___atomic = "yes" ; then
1111
- opal_cv_asm_builtin="BUILTIN_GCC"
1064
+ opal_cv_asm_builtin="BUILTIN_GCC"
1112
1065
else
1113
1066
AC_MSG_WARN ( [ GCC built-in atomics requested but not found.] )
1114
1067
AC_MSG_ERROR ( [ Cannot continue] )
@@ -1129,63 +1082,43 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
1129
1082
# find our architecture for purposes of assembly stuff
1130
1083
opal_cv_asm_arch="UNSUPPORTED"
1131
1084
OPAL_GCC_INLINE_ASSIGN=""
1132
- if test "$opal_cv_have___atomic_64" ; then
1133
- OPAL_ASM_SUPPORT_64BIT=1
1134
- else
1135
- OPAL_ASM_SUPPORT_64BIT=0
1136
- fi
1137
1085
1138
1086
case "${host}" in
1139
- x86_64-*x32)
1140
- opal_cv_asm_arch="X86_64"
1141
- OPAL_ASM_SUPPORT_64BIT=1
1142
- OPAL_GCC_INLINE_ASSIGN='"xaddl %1,%0" : "=m"(ret), "+r"(negone) : "m"(ret)'
1143
- ;;
1144
- i?86-*|x86_64*|amd64*)
1087
+ x86_64-*x32|i?86-*|x86_64*|amd64*)
1145
1088
if test "$ac_cv_sizeof_long" = "4" ; then
1146
- opal_cv_asm_arch="IA32"
1147
- else
1148
- opal_cv_asm_arch="X86_64"
1149
- fi
1150
- OPAL_ASM_SUPPORT_64BIT=1
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
1151
1097
OPAL_GCC_INLINE_ASSIGN='"xaddl %1,%0" : "=m"(ret), "+r"(negone) : "m"(ret)'
1152
- OPAL_CHECK_CMPXCHG16B
1153
1098
;;
1154
1099
1155
1100
aarch64*)
1156
1101
opal_cv_asm_arch="ARM64"
1157
- OPAL_ASM_SUPPORT_64BIT=1
1158
- OPAL_ASM_ARM_VERSION=8
1159
1102
OPAL_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
1160
1103
;;
1161
1104
1162
- armv7*|arm-*-linux-gnueabihf)
1163
- opal_cv_asm_arch="ARM"
1164
- OPAL_ASM_SUPPORT_64BIT=1
1165
- OPAL_ASM_ARM_VERSION=7
1166
- OPAL_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
1167
- ;;
1105
+ armv7*|arm-*-linux-gnueabihf|armv6*)
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
1168
1109
1169
- armv6*)
1170
1110
opal_cv_asm_arch="ARM"
1171
- OPAL_ASM_SUPPORT_64BIT=0
1172
- OPAL_ASM_ARM_VERSION=6
1173
- CCASFLAGS="$CCASFLAGS -march=armv7-a"
1174
1111
OPAL_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
1175
1112
;;
1176
1113
1177
1114
powerpc-*|powerpc64-*|powerpcle-*|powerpc64le-*|rs6000-*|ppc-*)
1178
1115
OPAL_CHECK_POWERPC_REG
1179
1116
if test "$ac_cv_sizeof_long" = "4" ; then
1180
- opal_cv_asm_arch="POWERPC32"
1181
-
1182
- # Note that on some platforms (Apple G5), even if we are
1183
- # compiling in 32 bit mode (and therefore should assume
1184
- # sizeof(long) == 4), we can use the 64 bit test and set
1185
- # operations.
1186
- OPAL_CHECK_POWERPC_64BIT(OPAL_ASM_SUPPORT_64BIT=1)
1187
- elif test "$ac_cv_sizeof_long" = "8" ; then
1188
- OPAL_ASM_SUPPORT_64BIT=1
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
1189
1122
opal_cv_asm_arch="POWERPC64"
1190
1123
else
1191
1124
AC_MSG_ERROR ( [ Could not determine PowerPC word size: $ac_cv_sizeof_long] )
@@ -1213,20 +1146,10 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
1213
1146
;;
1214
1147
esac
1215
1148
1216
- if ! test -z "$OPAL_ASM_ARM_VERSION" ; then
1217
- AC_DEFINE_UNQUOTED ( [ OPAL_ASM_ARM_VERSION] , [ $OPAL_ASM_ARM_VERSION] ,
1218
- [ What ARM assembly version to use] )
1219
- fi
1220
-
1221
1149
if test "$opal_cv_asm_builtin" = "BUILTIN_GCC" ; then
1222
1150
AC_DEFINE ( [ OPAL_C_GCC_INLINE_ASSEMBLY] , [ 1] ,
1223
1151
[ Whether C compiler supports GCC style inline assembly] )
1224
1152
else
1225
- AC_DEFINE_UNQUOTED ( [ OPAL_ASM_SUPPORT_64BIT] ,
1226
- [ $OPAL_ASM_SUPPORT_64BIT] ,
1227
- [ Whether we can do 64bit assembly operations or not. Should not be used outside of the assembly header files] )
1228
- AC_SUBST ( [ OPAL_ASM_SUPPORT_64BIT] )
1229
-
1230
1153
opal_cv_asm_inline_supported="no"
1231
1154
# now that we know our architecture, try to inline assemble
1232
1155
OPAL_CHECK_INLINE_C_GCC([ $OPAL_GCC_INLINE_ASSIGN] )
@@ -1239,12 +1162,12 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
1239
1162
asm_format="${asm_format}-${opal_cv_asm_lsym}"
1240
1163
asm_format="${asm_format}-${opal_cv_asm_type}-${opal_asm_size}"
1241
1164
asm_format="${asm_format}-${opal_asm_align_log_result}"
1242
- if test "$opal_cv_asm_arch" = "POWERPC32" || test "$opal_cv_asm_arch" = " POWERPC64" ; then
1165
+ if test "$opal_cv_asm_arch" = "POWERPC64" ; then
1243
1166
asm_format="${asm_format}-${opal_cv_asm_powerpc_r_reg}"
1244
1167
else
1245
1168
asm_format="${asm_format}-1"
1246
1169
fi
1247
- asm_format="${asm_format}-${OPAL_ASM_SUPPORT_64BIT} "
1170
+ asm_format="${asm_format}-1 "
1248
1171
opal_cv_asm_format="${asm_format}-${opal_cv_asm_gnu_stack}"
1249
1172
# For the Makefile, need to escape the $ as $$. Don't display
1250
1173
# this version, but make sure the Makefile gives the right thing
@@ -1256,7 +1179,7 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
1256
1179
AC_DEFINE_UNQUOTED ( [ OPAL_ASSEMBLY_FORMAT] , [ "$OPAL_ASSEMBLY_FORMAT"] ,
1257
1180
[ Format of assembly file] )
1258
1181
AC_SUBST ( [ OPAL_ASSEMBLY_FORMAT] )
1259
- fi # if opal_cv_asm_builtin = BUILTIN_GCC
1182
+ fi # if opal_cv_asm_builtin = BUILTIN_GCC
1260
1183
1261
1184
result="OPAL_$opal_cv_asm_arch"
1262
1185
OPAL_ASSEMBLY_ARCH="$opal_cv_asm_arch"
0 commit comments