Skip to content

Commit ebce88b

Browse files
committed
opal: remove generated asm code
Every modern compiler supports either inline assembly or builtin atomic operations. Because of this it is time to delete all the code associated with pre-built atomics. This commit also clean out the DEC and XLC asm checks. Neither check does anything and the XLC compiler supports GCC ASM. Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 29b059e commit ebce88b

22 files changed

+12
-1912
lines changed

config/opal_config_asm.m4

Lines changed: 4 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,7 @@ return ret;
884884
885885
if test "$asm_result" = "yes" ; then
886886
OPAL_C_GCC_INLINE_ASSEMBLY=1
887+
opal_cv_asm_inline_supported="yes"
887888
else
888889
OPAL_C_GCC_INLINE_ASSEMBLY=0
889890
fi
@@ -895,70 +896,6 @@ return ret;
895896
unset OPAL_C_GCC_INLINE_ASSEMBLY assembly asm_result
896897
])dnl
897898

898-
899-
dnl #################################################################
900-
dnl
901-
dnl OPAL_CHECK_INLINE_DEC
902-
dnl
903-
dnl DEFINE OPAL_DEC to 0 or 1 depending on DEC
904-
dnl support
905-
dnl
906-
dnl #################################################################
907-
AC_DEFUN([OPAL_CHECK_INLINE_C_DEC],[
908-
909-
AC_MSG_CHECKING([if $CC supports DEC inline assembly])
910-
911-
AC_LINK_IFELSE([AC_LANG_PROGRAM([
912-
AC_INCLUDES_DEFAULT
913-
#include <c_asm.h>],
914-
[[asm("");
915-
return 0;]])],
916-
[asm_result="yes"], [asm_result="no"])
917-
918-
AC_MSG_RESULT([$asm_result])
919-
920-
if test "$asm_result" = "yes" ; then
921-
OPAL_C_DEC_INLINE_ASSEMBLY=1
922-
else
923-
OPAL_C_DEC_INLINE_ASSEMBLY=0
924-
fi
925-
926-
AC_DEFINE_UNQUOTED([OPAL_C_DEC_INLINE_ASSEMBLY],
927-
[$OPAL_C_DEC_INLINE_ASSEMBLY],
928-
[Whether C compiler supports DEC style inline assembly])
929-
930-
unset OPAL_C_DEC_INLINE_ASSEMBLY asm_result
931-
])dnl
932-
933-
934-
dnl #################################################################
935-
dnl
936-
dnl OPAL_CHECK_INLINE_XLC
937-
dnl
938-
dnl DEFINE OPAL_XLC to 0 or 1 depending on XLC
939-
dnl support
940-
dnl
941-
dnl #################################################################
942-
AC_DEFUN([OPAL_CHECK_INLINE_C_XLC],[
943-
944-
AC_MSG_CHECKING([if $CC supports XLC inline assembly])
945-
946-
OPAL_C_XLC_INLINE_ASSEMBLY=0
947-
asm_result="no"
948-
if test "$CC" = "xlc" ; then
949-
OPAL_XLC_INLINE_ASSEMBLY=1
950-
asm_result="yes"
951-
fi
952-
953-
AC_MSG_RESULT([$asm_result])
954-
AC_DEFINE_UNQUOTED([OPAL_C_XLC_INLINE_ASSEMBLY],
955-
[$OPAL_C_XLC_INLINE_ASSEMBLY],
956-
[Whether C compiler supports XLC style inline assembly])
957-
958-
unset OPAL_C_XLC_INLINE_ASSEMBLY
959-
])dnl
960-
961-
962899
dnl #################################################################
963900
dnl
964901
dnl OPAL_CONFIG_ASM
@@ -1163,10 +1100,9 @@ AC_MSG_ERROR([Can not continue.])
11631100
;;
11641101
esac
11651102
1103+
opal_cv_asm_inline_supported="no"
11661104
# now that we know our architecture, try to inline assemble
11671105
OPAL_CHECK_INLINE_C_GCC([$OPAL_GCC_INLINE_ASSIGN])
1168-
OPAL_CHECK_INLINE_C_DEC
1169-
OPAL_CHECK_INLINE_C_XLC
11701106
11711107
# format:
11721108
# config_file-text-global-label_suffix-gsym-lsym-type-size-align_log-ppc_r_reg-64_bit-gnu_stack
@@ -1251,64 +1187,10 @@ AC_DEFUN([OPAL_ASM_FIND_FILE], [
12511187
AC_REQUIRE([AC_PROG_GREP])
12521188
AC_REQUIRE([AC_PROG_FGREP])
12531189
1254-
if test "$opal_cv_asm_arch" != "WINDOWS" && test "$opal_cv_asm_builtin" != "BUILTIN_SYNC" && test "$opal_cv_asm_builtin" != "BUILTIN_GCC" && test "$opal_cv_asm_builtin" != "BUILTIN_OSX" ; then
1255-
# see if we have a pre-built one already
1256-
AC_MSG_CHECKING([for pre-built assembly file])
1257-
opal_cv_asm_file=""
1258-
if $GREP "$opal_cv_asm_arch" "${OPAL_TOP_SRCDIR}/opal/asm/asm-data.txt" | $FGREP "$opal_cv_asm_format" >conftest.out 2>&1 ; then
1259-
opal_cv_asm_file="`cut -f3 conftest.out`"
1260-
if test ! "$opal_cv_asm_file" = "" ; then
1261-
opal_cv_asm_file="atomic-${opal_cv_asm_file}.s"
1262-
if test -f "${OPAL_TOP_SRCDIR}/opal/asm/generated/${opal_cv_asm_file}" ; then
1263-
AC_MSG_RESULT([yes ($opal_cv_asm_file)])
1264-
else
1265-
AC_MSG_RESULT([no ($opal_cv_asm_file not found)])
1266-
opal_cv_asm_file=""
1267-
fi
1268-
fi
1269-
else
1270-
AC_MSG_RESULT([no (not in asm-data)])
1271-
fi
1272-
rm -rf conftest.*
1273-
1274-
if test "$opal_cv_asm_file" = "" ; then
1275-
# Can we generate a file?
1276-
AC_MSG_CHECKING([whether possible to generate assembly file])
1277-
mkdir -p opal/asm/generated
1278-
opal_cv_asm_file="atomic-local.s"
1279-
opal_try='$PERL $OPAL_TOP_SRCDIR/opal/asm/generate-asm.pl $opal_cv_asm_arch "$opal_cv_asm_format" $OPAL_TOP_SRCDIR/opal/asm/base $OPAL_TOP_BUILDDIR/opal/asm/generated/$opal_cv_asm_file >conftest.out 2>&1'
1280-
if AC_TRY_EVAL(opal_try) ; then
1281-
# save the warnings
1282-
cat conftest.out >&AC_FD_CC
1283-
AC_MSG_RESULT([yes])
1284-
else
1285-
# save output
1286-
cat conftest.out >&AC_FD_CC
1287-
opal_cv_asm_file=""
1288-
AC_MSG_RESULT([failed])
1289-
AC_MSG_WARN([Could not build atomic operations assembly file.])
1290-
AC_MSG_WARN([There will be no atomic operations for this build.])
1291-
fi
1292-
fi
1293-
rm -rf conftest.*
1190+
if test "$opal_cv_asm_arch" != "WINDOWS" && test "$opal_cv_asm_builtin" != "BUILTIN_SYNC" && test "$opal_cv_asm_builtin" != "BUILTIN_GCC" && test "$opal_cv_asm_builtin" != "BUILTIN_OSX" && test "$opal_cv_asm_inline_arch" = "no" ; then
1191+
AC_MSG_ERROR([no atomic support available. exiting])
12941192
else
12951193
# On windows with VC++, atomics are done with compiler primitives
12961194
opal_cv_asm_file=""
12971195
fi
1298-
1299-
AC_MSG_CHECKING([for atomic assembly filename])
1300-
if test "$opal_cv_asm_file" = "" ; then
1301-
AC_MSG_RESULT([none])
1302-
result=0
1303-
else
1304-
AC_MSG_RESULT([$opal_cv_asm_file])
1305-
result=1
1306-
fi
1307-
1308-
AC_DEFINE_UNQUOTED([OPAL_HAVE_ASM_FILE], [$result],
1309-
[Whether there is an atomic assembly file available])
1310-
AM_CONDITIONAL([OPAL_HAVE_ASM_FILE], [test "$result" = "1"])
1311-
1312-
OPAL_ASM_FILE=$opal_cv_asm_file
1313-
AC_SUBST(OPAL_ASM_FILE)
13141196
])dnl

config/opal_config_files.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ AC_DEFUN([OPAL_CONFIG_FILES],[
1515
opal/Makefile
1616
opal/etc/Makefile
1717
opal/include/Makefile
18-
opal/asm/Makefile
1918
opal/datatype/Makefile
2019
opal/util/Makefile
2120
opal/util/keyval/Makefile

opal/Makefile.am

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
SUBDIRS = \
2424
include \
25-
asm \
2625
datatype \
2726
etc \
2827
util \
@@ -37,7 +36,6 @@ SUBDIRS = \
3736
# therefore make distclean will fail).
3837
DIST_SUBDIRS = \
3938
include \
40-
asm \
4139
datatype \
4240
etc \
4341
util \
@@ -50,7 +48,6 @@ DIST_SUBDIRS = \
5048
lib_LTLIBRARIES = lib@[email protected]
5149
lib@OPAL_LIB_PREFIX@open_pal_la_SOURCES =
5250
lib@OPAL_LIB_PREFIX@open_pal_la_LIBADD = \
53-
asm/libasm.la \
5451
datatype/libdatatype.la \
5552
mca/base/libmca_base.la \
5653
util/libopalutil.la \

opal/asm/Makefile.am

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)