1
1

Per RFC, continue renaming project

This commit was SVN r31667.
Этот коммит содержится в:
Ralph Castain 2014-05-07 01:00:06 +00:00
родитель 4501285c26
Коммит a54dbb17d2
6 изменённых файлов: 159 добавлений и 158 удалений

Просмотреть файл

@ -32,12 +32,12 @@ AC_DEFUN([OPAL_CHECK_SYNC_BUILTINS], [
dnl #################################################################
dnl
dnl OMPI_CHECK_ASM_TEXT
dnl OPAL_CHECK_ASM_TEXT
dnl
dnl Determine how to set current mode as text.
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_ASM_TEXT],[
AC_DEFUN([OPAL_CHECK_ASM_TEXT],[
AC_MSG_CHECKING([directive for setting text section])
opal_cv_asm_text=""
if test "$opal_cv_c_compiler_vendor" = "microsoft" ; then
@ -64,7 +64,7 @@ AC_DEFUN([OMPI_CHECK_ASM_TEXT],[
dnl #################################################################
dnl
dnl OMPI_CHECK_ASM_GLOBAL
dnl OPAL_CHECK_ASM_GLOBAL
dnl
dnl Sets OPAL_ASM_GLOBAL to the value to prefix global values
dnl
@ -72,7 +72,7 @@ dnl I'm sure if I don't have a test for this, there will be some
dnl dumb platform that uses something else
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_ASM_GLOBAL],[
AC_DEFUN([OPAL_CHECK_ASM_GLOBAL],[
AC_MSG_CHECKING([directive for exporting symbols])
opal_cv_asm_global=""
if test "$opal_cv_c_compiler_vendor" = "microsoft" ; then
@ -94,7 +94,7 @@ AC_DEFUN([OMPI_CHECK_ASM_GLOBAL],[
dnl #################################################################
dnl
dnl OMPI_CHECK_ASM_LSYM
dnl OPAL_CHECK_ASM_LSYM
dnl
dnl Sets OPAL_ASM_LSYM to the prefix value on a symbol to make it
dnl an internal label (jump target and whatnot)
@ -105,9 +105,9 @@ dnl back to L if nothing else seems to work :/
dnl
dnl #################################################################
# _OMPI_CHECK_ASM_LSYM([variable-to-set])
# _OPAL_CHECK_ASM_LSYM([variable-to-set])
# ---------------------------------------
AC_DEFUN([_OMPI_CHECK_ASM_LSYM],[
AC_DEFUN([_OPAL_CHECK_ASM_LSYM],[
AC_REQUIRE([AC_PROG_GREP])
$1="L"
@ -144,14 +144,14 @@ ${sym}mytestlabel$opal_cv_asm_label_suffix],
unset asm_result sym
])
# OMPI_CHECK_ASM_LSYM()
# OPAL_CHECK_ASM_LSYM()
# ---------------------
AC_DEFUN([OMPI_CHECK_ASM_LSYM],[
AC_DEFUN([OPAL_CHECK_ASM_LSYM],[
AC_REQUIRE([AC_PROG_NM])
AC_CACHE_CHECK([prefix for lsym labels],
[opal_cv_asm_lsym],
[_OMPI_CHECK_ASM_LSYM([opal_cv_asm_lsym])])
[_OPAL_CHECK_ASM_LSYM([opal_cv_asm_lsym])])
AC_DEFINE_UNQUOTED([OPAL_ASM_LSYM], ["$opal_cv_asm_lsym"],
[Assembly prefix for lsym labels])
OPAL_ASM_LSYM="$opal_cv_asm_lsym"
@ -160,45 +160,45 @@ AC_DEFUN([OMPI_CHECK_ASM_LSYM],[
dnl #################################################################
dnl
dnl OMPI_CHECK_ASM_PROC
dnl OPAL_CHECK_ASM_PROC
dnl
dnl Sets a cv-flag, if the compiler needs a proc/endp-definition to
dnl link with C.
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_ASM_PROC],[
AC_DEFUN([OPAL_CHECK_ASM_PROC],[
AC_CACHE_CHECK([if .proc/endp is needed],
[ompi_cv_asm_need_proc],
[ompi_cv_asm_need_proc="no"
[opal_cv_asm_need_proc],
[opal_cv_asm_need_proc="no"
OPAL_TRY_ASSEMBLE([
.proc mysym
mysym:
.endp mysym],
[ompi_cv_asm_need_proc="yes"])
[opal_cv_asm_need_proc="yes"])
rm -f conftest.out])
if test "$ompi_cv_asm_need_proc" = "yes" ; then
ompi_cv_asm_proc=".proc"
ompi_cv_asm_endproc=".endp"
if test "$opal_cv_asm_need_proc" = "yes" ; then
opal_cv_asm_proc=".proc"
opal_cv_asm_endproc=".endp"
else
ompi_cv_asm_proc="#"
ompi_cv_asm_endproc="#"
opal_cv_asm_proc="#"
opal_cv_asm_endproc="#"
fi
])dnl
dnl #################################################################
dnl
dnl OMPI_CHECK_ASM_GSYM
dnl OPAL_CHECK_ASM_GSYM
dnl
dnl Sets OPAL_ASM_GSYM to the prefix value on a symbol to make it
dnl a global linkable from C. Basically, an _ or not.
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_ASM_GSYM],[
AC_DEFUN([OPAL_CHECK_ASM_GSYM],[
AC_CACHE_CHECK([prefix for global symbol labels],
[opal_cv_asm_gsym],
[_OMPI_CHECK_ASM_GSYM])
[_OPAL_CHECK_ASM_GSYM])
if test "$opal_cv_asm_gsym" = "none" ; then
AC_MSG_ERROR([Could not determine global symbol label prefix])
@ -211,7 +211,7 @@ AC_DEFUN([OMPI_CHECK_ASM_GSYM],[
])
AC_DEFUN([_OMPI_CHECK_ASM_GSYM],[
AC_DEFUN([_OPAL_CHECK_ASM_GSYM],[
opal_cv_asm_gsym="none"
for sym in "_" "" "." ; do
@ -234,10 +234,10 @@ main()
EOF
OPAL_TRY_ASSEMBLE([
$opal_cv_asm_text
$ompi_cv_asm_proc ${sym}gsym_test_func
$opal_cv_asm_proc ${sym}gsym_test_func
$opal_cv_asm_global ${sym}gsym_test_func
${sym}gsym_test_func${opal_cv_asm_label_suffix}
$ompi_cv_asm_endproc ${sym}gsym_test_func
$opal_cv_asm_endproc ${sym}gsym_test_func
],
[ompi_compile="$CC $CFLAGS -I. conftest_c.c -c > conftest.cmpl 2>&1"
if AC_TRY_EVAL(ompi_compile) ; then
@ -275,7 +275,7 @@ $ompi_cv_asm_endproc ${sym}gsym_test_func
dnl #################################################################
dnl
dnl OMPI_CHECK_ASM_LABEL_SUFFIX
dnl OPAL_CHECK_ASM_LABEL_SUFFIX
dnl
dnl Sets OPAL_ASM_LABEL_SUFFIX to the value to suffix for labels
dnl
@ -283,7 +283,7 @@ dnl I'm sure if I don't have a test for this, there will be some
dnl dumb platform that uses something else
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_ASM_LABEL_SUFFIX],[
AC_DEFUN([OPAL_CHECK_ASM_LABEL_SUFFIX],[
AC_MSG_CHECKING([suffix for labels])
opal_cv_asm_label_suffix=""
case $host in
@ -301,18 +301,18 @@ AC_DEFUN([OMPI_CHECK_ASM_LABEL_SUFFIX],[
dnl #################################################################
dnl
dnl OMPI_CHECK_ASM_ALIGN_LOG
dnl OPAL_CHECK_ASM_ALIGN_LOG
dnl
dnl Sets OPAL_ASM_ALIGN_LOG to 1 if align is specified
dnl logarithmically, 0 otherwise
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_ASM_ALIGN_LOG],[
AC_DEFUN([OPAL_CHECK_ASM_ALIGN_LOG],[
AC_REQUIRE([AC_PROG_NM])
AC_REQUIRE([AC_PROG_GREP])
AC_CACHE_CHECK([if .align directive takes logarithmic value],
[ompi_cv_asm_align_log],
[opal_cv_asm_align_log],
[ OPAL_TRY_ASSEMBLE([ $opal_cv_asm_text
.align 4
$opal_cv_asm_global foo
@ -325,12 +325,12 @@ foo$opal_cv_asm_label_suffix
# test for both 16 and 10 (decimal and hex notations)
echo "configure: .align test address offset is $ompi_asm_addr" >&AC_FD_CC
if test "$ompi_asm_addr" = "16" -o "$ompi_asm_addr" = "10" ; then
ompi_cv_asm_align_log="yes"
opal_cv_asm_align_log="yes"
else
ompi_cv_asm_align_log="no"
opal_cv_asm_align_log="no"
fi])
if test "$ompi_cv_asm_align_log" = "yes" -o "$ompi_cv_asm_align_log" = "1" ; then
if test "$opal_cv_asm_align_log" = "yes" -o "$opal_cv_asm_align_log" = "1" ; then
ompi_asm_align_log_result=1
else
ompi_asm_align_log_result=0
@ -346,7 +346,7 @@ foo$opal_cv_asm_label_suffix
dnl #################################################################
dnl
dnl OMPI_CHECK_ASM_TYPE
dnl OPAL_CHECK_ASM_TYPE
dnl
dnl Sets OPAL_ASM_TYPE to the prefix for the function type to
dnl set a symbol's type as function (needed on ELF for shared
@ -356,10 +356,10 @@ dnl
dnl We look for @ \# %
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_ASM_TYPE],[
AC_DEFUN([OPAL_CHECK_ASM_TYPE],[
AC_CACHE_CHECK([prefix for function in .type],
[opal_cv_asm_type],
[_OMPI_CHECK_ASM_TYPE])
[_OPAL_CHECK_ASM_TYPE])
AC_DEFINE_UNQUOTED([OPAL_ASM_TYPE], ["$opal_cv_asm_type"],
[How to set function type in .type directive])
@ -367,7 +367,7 @@ AC_DEFUN([OMPI_CHECK_ASM_TYPE],[
AC_SUBST(OPAL_ASM_TYPE)
])
AC_DEFUN([_OMPI_CHECK_ASM_TYPE],[
AC_DEFUN([_OPAL_CHECK_ASM_TYPE],[
opal_cv_asm_type=""
case "${host}" in
@ -399,21 +399,21 @@ mysym:],
dnl #################################################################
dnl
dnl OMPI_CHECK_ASM_SIZE
dnl OPAL_CHECK_ASM_SIZE
dnl
dnl Sets OPAL_ASM_SIZE to 1 if we should set .size directives for
dnl each function, 0 otherwise.
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_ASM_SIZE],[
AC_DEFUN([OPAL_CHECK_ASM_SIZE],[
AC_CACHE_CHECK([if .size is needed],
[ompi_cv_asm_need_size],
[ompi_cv_asm_need_size="no"
[opal_cv_asm_need_size],
[opal_cv_asm_need_size="no"
OPAL_TRY_ASSEMBLE([ .size mysym, 1],
[ompi_cv_asm_need_size="yes"])
[opal_cv_asm_need_size="yes"])
rm -f conftest.out])
if test "$ompi_cv_asm_need_size" = "yes" ; then
if test "$opal_cv_asm_need_size" = "yes" ; then
opal_asm_size=1
else
opal_asm_size=0
@ -427,48 +427,48 @@ AC_DEFUN([OMPI_CHECK_ASM_SIZE],[
])dnl
# OMPI_CHECK_ASM_GNU_STACKEXEC(var)
# OPAL_CHECK_ASM_GNU_STACKEXEC(var)
# ----------------------------------
# sets shell variable var to the things necessary to
# disable execable stacks with GAS
AC_DEFUN([OMPI_CHECK_ASM_GNU_STACKEXEC], [
AC_DEFUN([OPAL_CHECK_ASM_GNU_STACKEXEC], [
AC_REQUIRE([AC_PROG_GREP])
AC_CHECK_PROG([OBJDUMP], [objdump], [objdump])
AC_CACHE_CHECK([if .note.GNU-stack is needed],
[ompi_cv_asm_gnu_stack_result],
[opal_cv_asm_gnu_stack_result],
[AS_IF([test "$OBJDUMP" != ""],
[ # first, see if a simple C program has it set
cat >conftest.c <<EOF
int testfunc() {return 0; }
EOF
OPAL_LOG_COMMAND([$CC $CFLAGS -c conftest.c -o conftest.$OBJEXT],
[$OBJDUMP -x conftest.$OBJEXT | $GREP '\.note\.GNU-stack' > /dev/null && ompi_cv_asm_gnu_stack_result=yes],
[$OBJDUMP -x conftest.$OBJEXT | $GREP '\.note\.GNU-stack' > /dev/null && opal_cv_asm_gnu_stack_result=yes],
[OPAL_LOG_MSG([the failed program was:], 1)
OPAL_LOG_FILE([conftest.c])
ompi_cv_asm_gnu_stack_result=no])
if test "$ompi_cv_asm_gnu_stack_result" != "yes" ; then
ompi_cv_asm_gnu_stack_result="no"
opal_cv_asm_gnu_stack_result=no])
if test "$opal_cv_asm_gnu_stack_result" != "yes" ; then
opal_cv_asm_gnu_stack_result="no"
fi
rm -rf conftest.*],
[ompi_cv_asm_gnu_stack_result="no"])])
if test "$ompi_cv_asm_gnu_stack_result" = "yes" ; then
ompi_cv_asm_gnu_stack=1
[opal_cv_asm_gnu_stack_result="no"])])
if test "$opal_cv_asm_gnu_stack_result" = "yes" ; then
opal_cv_asm_gnu_stack=1
else
ompi_cv_asm_gnu_stack=0
opal_cv_asm_gnu_stack=0
fi
])dnl
dnl #################################################################
dnl
dnl OMPI_CHECK_POWERPC_REG
dnl OPAL_CHECK_POWERPC_REG
dnl
dnl See if the notation for specifying registers is X (most everyone)
dnl or rX (OS X)
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_POWERPC_REG],[
AC_DEFUN([OPAL_CHECK_POWERPC_REG],[
AC_MSG_CHECKING([if PowerPC registers have r prefix])
OPAL_TRY_ASSEMBLE([$opal_cv_asm_text
addi 1,1,0],
@ -491,7 +491,7 @@ AC_DEFUN([OMPI_CHECK_POWERPC_REG],[
dnl #################################################################
dnl
dnl OMPI_CHECK_POWERPC_64BIT
dnl OPAL_CHECK_POWERPC_64BIT
dnl
dnl On some powerpc chips (the PPC970 or G5), the OS usually runs in
dnl 32 bit mode, even though the hardware can do 64bit things. If
@ -499,7 +499,7 @@ dnl the compiler will let us, emit code for 64bit test and set type
dnl operations (on a long long).
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_POWERPC_64BIT],[
AC_DEFUN([OPAL_CHECK_POWERPC_64BIT],[
if test "$ac_cv_sizeof_long" != "4" ; then
# this function should only be called in the 32 bit case
AC_MSG_ERROR([CHECK_POWERPC_64BIT called on 64 bit platform. Internal error.])
@ -537,10 +537,10 @@ AC_DEFUN([OMPI_CHECK_POWERPC_64BIT],[
dnl #################################################################
dnl
dnl OMPI_CHECK_SPARCV8PLUS
dnl OPAL_CHECK_SPARCV8PLUS
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_SPARCV8PLUS],[
AC_DEFUN([OPAL_CHECK_SPARCV8PLUS],[
AC_MSG_CHECKING([if have Sparc v8+/v9 support])
sparc_result=0
OPAL_TRY_ASSEMBLE([$opal_cv_asm_text
@ -585,7 +585,7 @@ dnl DEFINE OMPI_GCC_INLINE_ASSEMBLY to 0 or 1 depending on GCC
dnl support
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_INLINE_C_GCC],[
AC_DEFUN([OPAL_CHECK_INLINE_C_GCC],[
assembly="$1"
asm_result="unknown"
@ -645,7 +645,7 @@ dnl DEFINE OMPI_DEC to 0 or 1 depending on DEC
dnl support
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_INLINE_C_DEC],[
AC_DEFUN([OPAL_CHECK_INLINE_C_DEC],[
AC_MSG_CHECKING([if $CC supports DEC inline assembly])
@ -680,14 +680,14 @@ dnl DEFINE OMPI_XLC to 0 or 1 depending on XLC
dnl support
dnl
dnl #################################################################
AC_DEFUN([OMPI_CHECK_INLINE_C_XLC],[
AC_DEFUN([OPAL_CHECK_INLINE_C_XLC],[
AC_MSG_CHECKING([if $CC supports XLC inline assembly])
OPAL_C_XLC_INLINE_ASSEMBLY=0
asm_result="no"
if test "$CC" = "xlc" ; then
OMPI_XLC_INLINE_ASSEMBLY=1
OPAL_XLC_INLINE_ASSEMBLY=1
asm_result="yes"
fi
@ -718,23 +718,23 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
# OS X Leopard ld bus errors if you have "-g" or "-gX" in the link line
# with our assembly (!). So remove it from CCASFLAGS if it's
# there (and we're on Leopard).
OPAL_VAR_SCOPE_PUSH([ompi_config_asm_flags_new ompi_config_asm_flag])
OPAL_VAR_SCOPE_PUSH([opal_config_asm_flags_new opal_config_asm_flag])
AC_MSG_CHECKING([if need to remove -g from CCASFLAGS])
case "$host" in
*-apple-darwin9.*)
for ompi_config_asm_flag in $CCASFLAGS; do
for opal_config_asm_flag in $CCASFLAGS; do
# See http://www.gnu.org/software/autoconf/manual/html_node/Quadrigraphs.html#Quadrigraphs
# for an explanation of @<:@ and @:>@ -- they m4 expand
# to [ and ]
case $ompi_config_asm_flag in
case $opal_config_asm_flag in
-g) ;;
-g@<:@0-9@:>@) ;;
*)
ompi_config_asm_flags_new="$ompi_config_asm_flags_new $ompi_config_asm_flag"
opal_config_asm_flags_new="$opal_config_asm_flags_new $opal_config_asm_flag"
;;
esac
done
CCASFLAGS="$ompi_config_asm_flags_new"
CCASFLAGS="$opal_config_asm_flags_new"
AC_MSG_RESULT([OS X Leopard - yes ($CCASFLAGS)])
;;
*)
@ -766,110 +766,110 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
[Enable use of OSX builtin atomics (default: disabled)])])
if test "$enable_builtin_atomics" = "yes" ; then
OPAL_CHECK_SYNC_BUILTINS([ompi_cv_asm_builtin="BUILTIN_SYNC"],
OPAL_CHECK_SYNC_BUILTINS([opal_cv_asm_builtin="BUILTIN_SYNC"],
[AC_MSG_ERROR([__sync builtin atomics requested but not found.])])
AC_DEFINE([OPAL_C_GCC_INLINE_ASSEMBLY], [1],
[Whether C compiler supports GCC style inline assembly])
elif test "$enable_osx_builtin_atomics" = "yes" ; then
AC_CHECK_HEADER([libkern/OSAtomic.h],[ompi_cv_asm_builtin="BUILTIN_OSX"],
AC_CHECK_HEADER([libkern/OSAtomic.h],[opal_cv_asm_builtin="BUILTIN_OSX"],
[AC_MSG_ERROR([OSX builtin atomics requested but not found.])])
else
ompi_cv_asm_builtin="BUILTIN_NO"
opal_cv_asm_builtin="BUILTIN_NO"
fi
OMPI_CHECK_ASM_PROC
OMPI_CHECK_ASM_TEXT
OMPI_CHECK_ASM_GLOBAL
OMPI_CHECK_ASM_GNU_STACKEXEC
OMPI_CHECK_ASM_LABEL_SUFFIX
OMPI_CHECK_ASM_GSYM
OMPI_CHECK_ASM_LSYM
OMPI_CHECK_ASM_TYPE
OMPI_CHECK_ASM_SIZE
OMPI_CHECK_ASM_ALIGN_LOG
OPAL_CHECK_ASM_PROC
OPAL_CHECK_ASM_TEXT
OPAL_CHECK_ASM_GLOBAL
OPAL_CHECK_ASM_GNU_STACKEXEC
OPAL_CHECK_ASM_LABEL_SUFFIX
OPAL_CHECK_ASM_GSYM
OPAL_CHECK_ASM_LSYM
OPAL_CHECK_ASM_TYPE
OPAL_CHECK_ASM_SIZE
OPAL_CHECK_ASM_ALIGN_LOG
# find our architecture for purposes of assembly stuff
ompi_cv_asm_arch="UNSUPPORTED"
OMPI_GCC_INLINE_ASSIGN=""
opal_cv_asm_arch="UNSUPPORTED"
OPAL_GCC_INLINE_ASSIGN=""
OPAL_ASM_SUPPORT_64BIT=0
case "${host}" in
i?86-*|x86_64*)
if test "$ac_cv_sizeof_long" = "4" ; then
ompi_cv_asm_arch="IA32"
opal_cv_asm_arch="IA32"
else
ompi_cv_asm_arch="AMD64"
opal_cv_asm_arch="AMD64"
fi
OPAL_ASM_SUPPORT_64BIT=1
OMPI_GCC_INLINE_ASSIGN='"xaddl %1,%0" : "=m"(ret), "+r"(negone) : "m"(ret)'
OPAL_GCC_INLINE_ASSIGN='"xaddl %1,%0" : "=m"(ret), "+r"(negone) : "m"(ret)'
;;
ia64-*)
ompi_cv_asm_arch="IA64"
opal_cv_asm_arch="IA64"
OPAL_ASM_SUPPORT_64BIT=1
OMPI_GCC_INLINE_ASSIGN='"mov %0=r0\n;;\n" : "=&r"(ret)'
OPAL_GCC_INLINE_ASSIGN='"mov %0=r0\n;;\n" : "=&r"(ret)'
;;
alpha-*|alphaev[[4-8]]-*|alphaev56-*|alphaev6[[78]]-*)
ompi_cv_asm_arch="ALPHA"
opal_cv_asm_arch="ALPHA"
OPAL_ASM_SUPPORT_64BIT=1
OMPI_GCC_INLINE_ASSIGN='"bis [$]31,[$]31,%0" : "=&r"(ret)'
OPAL_GCC_INLINE_ASSIGN='"bis [$]31,[$]31,%0" : "=&r"(ret)'
;;
armv7*)
ompi_cv_asm_arch="ARM"
opal_cv_asm_arch="ARM"
OPAL_ASM_SUPPORT_64BIT=1
OPAL_ASM_ARM_VERSION=7
AC_DEFINE_UNQUOTED([OPAL_ASM_ARM_VERSION], [$OPAL_ASM_ARM_VERSION],
[What ARM assembly version to use])
OMPI_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
OPAL_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
;;
armv6*)
ompi_cv_asm_arch="ARM"
opal_cv_asm_arch="ARM"
OPAL_ASM_SUPPORT_64BIT=0
OPAL_ASM_ARM_VERSION=6
CCASFLAGS="$CCASFLAGS -march=armv7-a"
AC_DEFINE_UNQUOTED([OPAL_ASM_ARM_VERSION], [$OPAL_ASM_ARM_VERSION],
[What ARM assembly version to use])
OMPI_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
OPAL_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
;;
armv5*linux*|armv4*linux*)
# uses Linux kernel helpers for some atomic operations
ompi_cv_asm_arch="ARM"
opal_cv_asm_arch="ARM"
OPAL_ASM_SUPPORT_64BIT=0
OPAL_ASM_ARM_VERSION=5
CCASFLAGS="$CCASFLAGS -march=armv7-a"
AC_DEFINE_UNQUOTED([OPAL_ASM_ARM_VERSION], [$OPAL_ASM_ARM_VERSION],
[What ARM assembly version to use])
OMPI_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
OPAL_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
;;
mips-*|mips64*)
# Should really find some way to make sure that we are on
# a MIPS III machine (r4000 and later)
ompi_cv_asm_arch="MIPS"
opal_cv_asm_arch="MIPS"
OPAL_ASM_SUPPORT_64BIT=1
OMPI_GCC_INLINE_ASSIGN='"or %0,[$]0,[$]0" : "=&r"(ret)'
OPAL_GCC_INLINE_ASSIGN='"or %0,[$]0,[$]0" : "=&r"(ret)'
;;
powerpc-*|powerpc64-*|rs6000-*|ppc-*)
OMPI_CHECK_POWERPC_REG
OPAL_CHECK_POWERPC_REG
if test "$ac_cv_sizeof_long" = "4" ; then
ompi_cv_asm_arch="POWERPC32"
opal_cv_asm_arch="POWERPC32"
# Note that on some platforms (Apple G5), even if we are
# compiling in 32 bit mode (and therefore should assume
# sizeof(long) == 4), we can use the 64 bit test and set
# operations.
OMPI_CHECK_POWERPC_64BIT(OPAL_ASM_SUPPORT_64BIT=1)
OPAL_CHECK_POWERPC_64BIT(OPAL_ASM_SUPPORT_64BIT=1)
elif test "$ac_cv_sizeof_long" = "8" ; then
OPAL_ASM_SUPPORT_64BIT=1
ompi_cv_asm_arch="POWERPC64"
opal_cv_asm_arch="POWERPC64"
else
AC_MSG_ERROR([Could not determine PowerPC word size: $ac_cv_sizeof_long])
fi
OMPI_GCC_INLINE_ASSIGN='"1: li %0,0" : "=&r"(ret)'
OPAL_GCC_INLINE_ASSIGN='"1: li %0,0" : "=&r"(ret)'
;;
sparc*-*)
@ -878,35 +878,35 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
# earlier (casa is v8+/v9).
if test "$ac_cv_sizeof_long" = "4" ; then
have_v8plus=0
OMPI_CHECK_SPARCV8PLUS([have_v8plus=1])
OPAL_CHECK_SPARCV8PLUS([have_v8plus=1])
if test "$have_v8plus" = "0" ; then
OPAL_ASM_SUPPORT_64BIT=0
ompi_cv_asm_arch="SPARC"
opal_cv_asm_arch="SPARC"
AC_MSG_WARN([Sparc v8 target is not supported in this release of Open MPI.])
AC_MSG_WARN([You must specify the target architecture v8plus to compile])
AC_MSG_WARN([Open MPI in 32 bit mode on Sparc processors (see the README).])
AC_MSG_ERROR([Can not continue.])
else
OPAL_ASM_SUPPORT_64BIT=1
ompi_cv_asm_arch="SPARCV9_32"
opal_cv_asm_arch="SPARCV9_32"
fi
elif test "$ac_cv_sizeof_long" = "8" ; then
OPAL_ASM_SUPPORT_64BIT=1
ompi_cv_asm_arch="SPARCV9_64"
opal_cv_asm_arch="SPARCV9_64"
else
AC_MSG_ERROR([Could not determine Sparc word size: $ac_cv_sizeof_long])
fi
OMPI_GCC_INLINE_ASSIGN='"mov 0,%0" : "=&r"(ret)'
OPAL_GCC_INLINE_ASSIGN='"mov 0,%0" : "=&r"(ret)'
;;
*)
OPAL_CHECK_SYNC_BUILTINS([ompi_cv_asm_builtin="BUILTIN_SYNC"],
OPAL_CHECK_SYNC_BUILTINS([opal_cv_asm_builtin="BUILTIN_SYNC"],
[AC_MSG_ERROR([No atomic primitives available for $host])])
;;
esac
if test "$ompi_cv_asm_builtin" = "BUILTIN_SYNC" ; then
if test "$opal_cv_asm_builtin" = "BUILTIN_SYNC" ; then
AC_DEFINE([OPAL_C_GCC_INLINE_ASSEMBLY], [1],
[Whether C compiler supports GCC style inline assembly])
else
@ -928,9 +928,9 @@ AC_MSG_ERROR([Can not continue.])
esac
# now that we know our architecture, try to inline assemble
OMPI_CHECK_INLINE_C_GCC([$OMPI_GCC_INLINE_ASSIGN])
OMPI_CHECK_INLINE_C_DEC
OMPI_CHECK_INLINE_C_XLC
OPAL_CHECK_INLINE_C_GCC([$OPAL_GCC_INLINE_ASSIGN])
OPAL_CHECK_INLINE_C_DEC
OPAL_CHECK_INLINE_C_XLC
# format:
# config_file-text-global-label_suffix-gsym-lsym-type-size-align_log-ppc_r_reg-64_bit-gnu_stack
@ -940,37 +940,37 @@ AC_MSG_ERROR([Can not continue.])
asm_format="${asm_format}-${opal_cv_asm_lsym}"
asm_format="${asm_format}-${opal_cv_asm_type}-${opal_asm_size}"
asm_format="${asm_format}-${ompi_asm_align_log_result}"
if test "$ompi_cv_asm_arch" = "POWERPC32" -o "$ompi_cv_asm_arch" = "POWERPC64" ; then
if test "$opal_cv_asm_arch" = "POWERPC32" -o "$opal_cv_asm_arch" = "POWERPC64" ; then
asm_format="${asm_format}-${opal_cv_asm_powerpc_r_reg}"
else
asm_format="${asm_format}-1"
fi
asm_format="${asm_format}-${OPAL_ASM_SUPPORT_64BIT}"
ompi_cv_asm_format="${asm_format}-${ompi_cv_asm_gnu_stack}"
opal_cv_asm_format="${asm_format}-${opal_cv_asm_gnu_stack}"
# For the Makefile, need to escape the $ as $$. Don't display
# this version, but make sure the Makefile gives the right thing
# when regenerating the files because the base has been touched.
OPAL_ASSEMBLY_FORMAT=`echo "$ompi_cv_asm_format" | sed -e 's/\\\$/\\\$\\\$/'`
OPAL_ASSEMBLY_FORMAT=`echo "$opal_cv_asm_format" | sed -e 's/\\\$/\\\$\\\$/'`
AC_MSG_CHECKING([for assembly format])
AC_MSG_RESULT([$ompi_cv_asm_format])
AC_MSG_RESULT([$opal_cv_asm_format])
AC_DEFINE_UNQUOTED([OPAL_ASSEMBLY_FORMAT], ["$OPAL_ASSEMBLY_FORMAT"],
[Format of assembly file])
AC_SUBST([OPAL_ASSEMBLY_FORMAT])
fi # if ompi_cv_asm_builtin = BUILTIN_SYNC
fi # if opal_cv_asm_builtin = BUILTIN_SYNC
result="OMPI_$ompi_cv_asm_arch"
OPAL_ASSEMBLY_ARCH="$ompi_cv_asm_arch"
result="OMPI_$opal_cv_asm_arch"
OPAL_ASSEMBLY_ARCH="$opal_cv_asm_arch"
AC_MSG_CHECKING([for asssembly architecture])
AC_MSG_RESULT([$ompi_cv_asm_arch])
AC_MSG_RESULT([$opal_cv_asm_arch])
AC_DEFINE_UNQUOTED([OPAL_ASSEMBLY_ARCH], [$result],
[Architecture type of assembly to use for atomic operations and CMA])
AC_SUBST([OPAL_ASSEMBLY_ARCH])
result="OMPI_$ompi_cv_asm_builtin"
OPAL_ASSEMBLY_BUILTIN="$ompi_cv_asm_builtin"
result="OMPI_$opal_cv_asm_builtin"
OPAL_ASSEMBLY_BUILTIN="$opal_cv_asm_builtin"
AC_MSG_CHECKING([for builtin atomics])
AC_MSG_RESULT([$ompi_cv_asm_builtin])
AC_MSG_RESULT([$opal_cv_asm_builtin])
AC_DEFINE_UNQUOTED([OPAL_ASSEMBLY_BUILTIN], [$result],
[Whether to use builtin atomics])
AC_SUBST([OPAL_ASSEMBLY_BUILTIN])
@ -993,21 +993,21 @@ AC_DEFUN([OMPI_ASM_FIND_FILE], [
AC_REQUIRE([AC_PROG_GREP])
AC_REQUIRE([AC_PROG_FGREP])
if test "$ompi_cv_asm_arch" != "WINDOWS" -a "$ompi_cv_asm_builtin" != "BUILTIN_SYNC" -a "$ompi_cv_asm_builtin" != "BUILTIN_OSX" ; then
if test "$opal_cv_asm_arch" != "WINDOWS" -a "$opal_cv_asm_builtin" != "BUILTIN_SYNC" -a "$opal_cv_asm_builtin" != "BUILTIN_OSX" ; then
AC_CHECK_PROG([PERL], [perl], [perl])
# see if we have a pre-built one already
AC_MSG_CHECKING([for pre-built assembly file])
ompi_cv_asm_file=""
if $GREP "$ompi_cv_asm_arch" "${top_ompi_srcdir}/opal/asm/asm-data.txt" | $FGREP "$ompi_cv_asm_format" >conftest.out 2>&1 ; then
ompi_cv_asm_file="`cut -f3 conftest.out`"
if test ! "$ompi_cv_asm_file" = "" ; then
ompi_cv_asm_file="atomic-${ompi_cv_asm_file}.s"
if test -f "${top_ompi_srcdir}/opal/asm/generated/${ompi_cv_asm_file}" ; then
AC_MSG_RESULT([yes ($ompi_cv_asm_file)])
opal_cv_asm_file=""
if $GREP "$opal_cv_asm_arch" "${top_ompi_srcdir}/opal/asm/asm-data.txt" | $FGREP "$opal_cv_asm_format" >conftest.out 2>&1 ; then
opal_cv_asm_file="`cut -f3 conftest.out`"
if test ! "$opal_cv_asm_file" = "" ; then
opal_cv_asm_file="atomic-${opal_cv_asm_file}.s"
if test -f "${top_ompi_srcdir}/opal/asm/generated/${opal_cv_asm_file}" ; then
AC_MSG_RESULT([yes ($opal_cv_asm_file)])
else
AC_MSG_RESULT([no ($ompi_cv_asm_file not found)])
ompi_cv_asm_file=""
AC_MSG_RESULT([no ($opal_cv_asm_file not found)])
opal_cv_asm_file=""
fi
fi
else
@ -1015,13 +1015,13 @@ if test "$ompi_cv_asm_arch" != "WINDOWS" -a "$ompi_cv_asm_builtin" != "BUILTIN_S
fi
rm -rf conftest.*
if test "$ompi_cv_asm_file" = "" ; then
if test "$opal_cv_asm_file" = "" ; then
if test ! "$PERL" = "" ; then
# we have perl... Can we generate a file?
AC_MSG_CHECKING([whether possible to generate assembly file])
mkdir -p opal/asm/generated
ompi_cv_asm_file="atomic-local.s"
ompi_try='$PERL $top_ompi_srcdir/opal/asm/generate-asm.pl $ompi_cv_asm_arch "$ompi_cv_asm_format" $top_ompi_srcdir/opal/asm/base $top_ompi_builddir/opal/asm/generated/$ompi_cv_asm_file >conftest.out 2>&1'
opal_cv_asm_file="atomic-local.s"
ompi_try='$PERL $top_ompi_srcdir/opal/asm/generate-asm.pl $opal_cv_asm_arch "$opal_cv_asm_format" $top_ompi_srcdir/opal/asm/base $top_ompi_builddir/opal/asm/generated/$opal_cv_asm_file >conftest.out 2>&1'
if AC_TRY_EVAL(ompi_try) ; then
# save the warnings
cat conftest.out >&AC_FD_CC
@ -1029,7 +1029,7 @@ if test "$ompi_cv_asm_arch" != "WINDOWS" -a "$ompi_cv_asm_builtin" != "BUILTIN_S
else
# save output
cat conftest.out >&AC_FD_CC
ompi_cv_asm_file=""
opal_cv_asm_file=""
AC_MSG_RESULT([failed])
AC_MSG_WARN([Could not build atomic operations assembly file.])
AC_MSG_WARN([There will be no atomic operations for this build.])
@ -1043,15 +1043,15 @@ if test "$ompi_cv_asm_arch" != "WINDOWS" -a "$ompi_cv_asm_builtin" != "BUILTIN_S
rm -rf conftest.*
else
# On windows with VC++, atomics are done with compiler primitives
ompi_cv_asm_file=""
opal_cv_asm_file=""
fi
AC_MSG_CHECKING([for atomic assembly filename])
if test "$ompi_cv_asm_file" = "" ; then
if test "$opal_cv_asm_file" = "" ; then
AC_MSG_RESULT([none])
result=0
else
AC_MSG_RESULT([$ompi_cv_asm_file])
AC_MSG_RESULT([$opal_cv_asm_file])
result=1
fi
@ -1059,6 +1059,6 @@ fi
[Whether there is an atomic assembly file available])
AM_CONDITIONAL([OPAL_HAVE_ASM_FILE], [test "$result" = "1"])
OMPI_ASM_FILE=$ompi_cv_asm_file
AC_SUBST(OMPI_ASM_FILE)
OPAL_ASM_FILE=$opal_cv_asm_file
AC_SUBST(OPAL_ASM_FILE)
])dnl

Просмотреть файл

@ -11,6 +11,7 @@ dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
@ -22,7 +23,7 @@ dnl
# target size, variable to set)
# -----------------------------------------------------------
AC_DEFUN([OPAL_FIND_TYPE],[
AS_VAR_PUSHDEF([type_var], [ompi_cv_find_type_$1])
AS_VAR_PUSHDEF([type_var], [opal_cv_find_type_$1])
oft_abort_on_fail="$3"
oft_target_size="$4"

Просмотреть файл

@ -27,28 +27,28 @@ include $(top_srcdir)/Makefile.ompi-rules
# time)
#
######################################################################
generated/@OMPI_ASM_FILE@: base/@OPAL_ASSEMBLY_ARCH@.asm
generated/@OPAL_ASM_FILE@: base/@OPAL_ASSEMBLY_ARCH@.asm
@ if test ! -f "$(top_srcdir)/opal/asm/$@" ; then \
cmd="$(PERL) '$(top_srcdir)/opal/asm/generate-asm.pl' '@OPAL_ASSEMBLY_ARCH@' '@OPAL_ASSEMBLY_FORMAT@' '$(top_srcdir)/opal/asm/base' '$(top_builddir)/opal/asm/generated/@OMPI_ASM_FILE@'" ; \
cmd="$(PERL) '$(top_srcdir)/opal/asm/generate-asm.pl' '@OPAL_ASSEMBLY_ARCH@' '@OPAL_ASSEMBLY_FORMAT@' '$(top_srcdir)/opal/asm/base' '$(top_builddir)/opal/asm/generated/@OPAL_ASM_FILE@'" ; \
echo "$$cmd" ; \
eval $$cmd ; \
fi
atomic-asm.S: generated/@OMPI_ASM_FILE@
atomic-asm.S: generated/@OPAL_ASM_FILE@
rm -f atomic-asm.S
@ if test -f "$(top_builddir)/opal/asm/generated/@OMPI_ASM_FILE@" ; then \
cmd="ln -s \"$(top_builddir)/opal/asm/generated/@OMPI_ASM_FILE@\" atomic-asm.S" ; \
@ if test -f "$(top_builddir)/opal/asm/generated/@OPAL_ASM_FILE@" ; then \
cmd="ln -s \"$(top_builddir)/opal/asm/generated/@OPAL_ASM_FILE@\" atomic-asm.S" ; \
echo "$$cmd" ; \
eval $$cmd ; \
else \
cmd="ln -s \"$(top_srcdir)/opal/asm/generated/@OMPI_ASM_FILE@\" atomic-asm.S" ; \
cmd="ln -s \"$(top_srcdir)/opal/asm/generated/@OPAL_ASM_FILE@\" atomic-asm.S" ; \
echo "$$cmd" ; \
eval $$cmd ; \
fi
if OPAL_HAVE_ASM_FILE
nodist_libasm_la_SOURCES = atomic-asm.S
libasm_la_DEPENDENCIES = generated/@OMPI_ASM_FILE@
libasm_la_DEPENDENCIES = generated/@OPAL_ASM_FILE@
else
nodist_libasm_la_SOURCES =
libasm_la_DEPENDENCIES =

Просмотреть файл

@ -72,11 +72,11 @@
/* We no longer support inline assembly for C++ as OPAL is a C-only interface */
#define OMPI_GCC_INLINE_ASSEMBLY 0
#define OMPI_DEC_INLINE_ASSEMBLY 0
#define OMPI_XLC_INLINE_ASSEMBLY 0
#define OPAL_XLC_INLINE_ASSEMBLY 0
#else
#define OMPI_GCC_INLINE_ASSEMBLY OPAL_C_GCC_INLINE_ASSEMBLY
#define OMPI_DEC_INLINE_ASSEMBLY OPAL_C_DEC_INLINE_ASSEMBLY
#define OMPI_XLC_INLINE_ASSEMBLY OPAL_C_XLC_INLINE_ASSEMBLY
#define OPAL_XLC_INLINE_ASSEMBLY OPAL_C_XLC_INLINE_ASSEMBLY
#endif

Просмотреть файл

@ -89,7 +89,7 @@ void opal_atomic_wmb(void)
WMB();
}
#elif OMPI_XLC_INLINE_ASSEMBLY /* end OMPI_GCC_INLINE_ASSEMBLY */
#elif OPAL_XLC_INLINE_ASSEMBLY /* end OMPI_GCC_INLINE_ASSEMBLY */
/* Yeah, I don't know who thought this was a reasonable syntax for
* inline assembly. Do these because they are used so often and they

Просмотреть файл

@ -56,11 +56,11 @@
#if defined(c_plusplus) || defined(__cplusplus)
#define OMPI_GCC_INLINE_ASSEMBLY OMPI_CXX_GCC_INLINE_ASSEMBLY
#define OMPI_DEC_INLINE_ASSEMBLY OMPI_CXX_DEC_INLINE_ASSEMBLY
#define OMPI_XLC_INLINE_ASSEMBLY OMPI_CXX_XLC_INLINE_ASSEMBLY
#define OPAL_XLC_INLINE_ASSEMBLY OMPI_CXX_XLC_INLINE_ASSEMBLY
#else
#define OMPI_GCC_INLINE_ASSEMBLY OPAL_C_GCC_INLINE_ASSEMBLY
#define OMPI_DEC_INLINE_ASSEMBLY OPAL_C_DEC_INLINE_ASSEMBLY
#define OMPI_XLC_INLINE_ASSEMBLY OPAL_C_XLC_INLINE_ASSEMBLY
#define OPAL_XLC_INLINE_ASSEMBLY OPAL_C_XLC_INLINE_ASSEMBLY
#endif
/**********************************************************************