Skip to content

Commit 1635c29

Browse files
Merge pull request #2522 from ggouaillardet/topic/misc_asm_fixes
Topic/misc asm fixes
2 parents c2f5758 + 299a6f8 commit 1635c29

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

config/opal_config_asm.m4

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,11 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
10031003
OPAL_GCC_INLINE_ASSIGN=""
10041004
OPAL_ASM_SUPPORT_64BIT=0
10051005
case "${host}" in
1006+
x86_64-*x32)
1007+
opal_cv_asm_arch="AMD64"
1008+
OPAL_ASM_SUPPORT_64BIT=1
1009+
OPAL_GCC_INLINE_ASSIGN='"xaddl %1,%0" : "=m"(ret), "+r"(negone) : "m"(ret)'
1010+
;;
10061011
i?86-*|x86_64*)
10071012
if test "$ac_cv_sizeof_long" = "4" ; then
10081013
opal_cv_asm_arch="IA32"
@@ -1028,7 +1033,7 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
10281033
OPAL_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
10291034
;;
10301035
1031-
armv7*)
1036+
armv7*|arm-*-linux-gnueabihf)
10321037
opal_cv_asm_arch="ARM"
10331038
OPAL_ASM_SUPPORT_64BIT=1
10341039
OPAL_ASM_ARM_VERSION=7
@@ -1047,7 +1052,7 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
10471052
OPAL_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
10481053
;;
10491054
1050-
armv5*linux*|armv4*linux*)
1055+
armv5*linux*|armv4*linux*|arm-*-linux-gnueabi)
10511056
# uses Linux kernel helpers for some atomic operations
10521057
opal_cv_asm_arch="ARM"
10531058
OPAL_ASM_SUPPORT_64BIT=0
@@ -1255,27 +1260,21 @@ if test "$opal_cv_asm_arch" != "WINDOWS" && test "$opal_cv_asm_builtin" != "BUIL
12551260
rm -rf conftest.*
12561261
12571262
if test "$opal_cv_asm_file" = "" ; then
1258-
if test ! "$PERL" = "" ; then
1259-
# we have perl... Can we generate a file?
1260-
AC_MSG_CHECKING([whether possible to generate assembly file])
1261-
mkdir -p opal/asm/generated
1262-
opal_cv_asm_file="atomic-local.s"
1263-
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'
1264-
if AC_TRY_EVAL(opal_try) ; then
1265-
# save the warnings
1266-
cat conftest.out >&AC_FD_CC
1267-
AC_MSG_RESULT([yes])
1268-
else
1269-
# save output
1270-
cat conftest.out >&AC_FD_CC
1271-
opal_cv_asm_file=""
1272-
AC_MSG_RESULT([failed])
1273-
AC_MSG_WARN([Could not build atomic operations assembly file.])
1274-
AC_MSG_WARN([There will be no atomic operations for this build.])
1275-
fi
1263+
# Can we generate a file?
1264+
AC_MSG_CHECKING([whether possible to generate assembly file])
1265+
mkdir -p opal/asm/generated
1266+
opal_cv_asm_file="atomic-local.s"
1267+
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'
1268+
if AC_TRY_EVAL(opal_try) ; then
1269+
# save the warnings
1270+
cat conftest.out >&AC_FD_CC
1271+
AC_MSG_RESULT([yes])
12761272
else
1277-
AC_MSG_WARN([Could not find prebuilt atomic operations file and could not])
1278-
AC_MSG_WARN([find perl to attempt to generate a custom assembly file.])
1273+
# save output
1274+
cat conftest.out >&AC_FD_CC
1275+
opal_cv_asm_file=""
1276+
AC_MSG_RESULT([failed])
1277+
AC_MSG_WARN([Could not build atomic operations assembly file.])
12791278
AC_MSG_WARN([There will be no atomic operations for this build.])
12801279
fi
12811280
fi

0 commit comments

Comments
 (0)