diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-08-12 03:10:20 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-08-12 03:10:20 +0200 |
commit | 794c3bc039d904f9ff61f341dac1e804342519f7 (patch) | |
tree | ac7963981645ca2e7874f98a787bcea891955671 /aclocal.m4 | |
parent | eac1788188d0fe0c5633490c38b0a0e0b6017ebf (diff) | |
download | gmp-794c3bc039d904f9ff61f341dac1e804342519f7.tar.gz |
Regenerate for:
* acinclude.m4 (GMP_ASM_X86_SSE2, GMP_STRIP_PATH): New macros.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 12afb8725..31b5c2625 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -38,6 +38,22 @@ define(X86_PATTERN, [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-*]]) +dnl GMP_STRIP_PATH(subdir) +dnl ---------------------- +dnl Strip entries */subdir from $path. + +define(GMP_STRIP_PATH, +[tmp_path= +for i in $path; do + case $i in + */$1) ;; + *) tmp_path="$tmp_path $i" ;; + esac +done +path="$tmp_path" +]) + + dnl GMP_INCLUDE_GMP_H dnl ----------------- dnl Expand to the right way to #include gmp-h.in. This must be used @@ -1154,6 +1170,42 @@ fi ]) +dnl GMP_ASM_X86_SSE2([ACTION-IF-FOUND][,ACTION-IF-NOT-FOUND]) +dnl --------------------------------------------------------- +dnl Determine whether the assembler supports SSE2 instructions. +dnl +dnl This macro is wanted before GMP_ASM_TEXT, so ".text" is hard coded +dnl here. ".text" is believed to be correct on all x86 systems, certainly +dnl it's all GMP_ASM_TEXT gives currently. Actually ".text" probably isn't +dnl needed at all, at least for just checking instruction syntax. + +AC_DEFUN(GMP_ASM_X86_SSE2, +[AC_CACHE_CHECK([if the assembler knows about SSE2 instructions], + gmp_cv_asm_x86_sse2, +[GMP_TRY_ASSEMBLE( +[ .text + paddq %mm0, %mm1], + [gmp_cv_asm_x86_sse2=yes], + [gmp_cv_asm_x86_sse2=no]) +]) +case $gmp_cv_asm_x86_sse2 in +yes) + ifelse([$1],,:,[$1]) + ;; +*) + AC_MSG_WARN([+----------------------------------------------------------]) + AC_MSG_WARN([| WARNING WARNING WARNING]) + AC_MSG_WARN([| Host CPU has SSE2 code, but it can't be assembled by]) + AC_MSG_WARN([| $CCAS $CFLAGS]) + AC_MSG_WARN([| Non-SSE2 replacements will be used.]) + AC_MSG_WARN([| This will be an inferior build.]) + AC_MSG_WARN([+----------------------------------------------------------]) + ifelse([$2],,:,[$2]) + ;; +esac +]) + + dnl GMP_ASM_X86_MCOUNT dnl ------------------ dnl Find out how to call mcount for profiling on an x86 system. |