diff -urNp beecrypt-4.1.2.org/acinclude.m4 beecrypt-4.1.2/acinclude.m4 --- beecrypt-4.1.2.org/acinclude.m4 2004-12-19 22:16:35.000000000 +0200 +++ beecrypt-4.1.2/acinclude.m4 2006-10-24 22:23:27.000000000 +0200 @@ -16,7 +16,7 @@ AC_DEFUN([BEECRYPT_WITH_CPU],[ i[[3456]]86) case $withval in i[[3456]]86 | \ - pentium | pentium-mmx | pentiumpro | pentium[[234]] | \ + pentium | pentium-m | pentium-mmx | pentiumpro | pentium[[234]] | \ athlon | athlon-tbird | athlon-4 | athlon-xp | athlon-mp) ;; *) @@ -80,9 +80,10 @@ AC_DEFUN([BEECRYPT_WITH_ARCH],[ case $target_cpu in i[[3456]]86) case $withval in + em64t | \ i[[3456]]86 | \ - pentium | pentium-mmx | pentiumpro | pentium[[234]] | \ - athlon | athlon-tbird | athlon-4 | athlon-xp | athlon-mp) + pentium | pentium-m | pentium-mmx | pentiumpro | pentium[[234]] | \ + athlon | athlon-tbird | athlon-4 | athlon-xp | athlon-mp | athlon64 | k8) if test "$ac_with_cpu" != yes; then bc_target_cpu=$withval fi @@ -906,7 +907,7 @@ AC_DEFUN([BEECRYPT_NOEXECSTACK],[ # convert conftest.c to conftest.s $CCAS $CFLAGS -S conftest.c # use egrep to find GNU-stack in in the output assembler - bc_gnu_stack=`$EGREP -e '\.section[[:space:]]+\.note\.GNU-stack' conftest.s` + bc_gnu_stack=`$EGREP -e '\.section.*GNU-stack' conftest.s` ],[ CFLAGS=$CFLAGS_save CXXFLAGS=$CXXFLAGS_save @@ -1126,6 +1127,11 @@ AC_DEFUN([BEECRYPT_ASM_SOURCES],[ m4 $srcdir/gas/mpopt.alpha.m4 > mpopt.s ]) ;; + x86_64 | athlon64 | athlon-fx | em64t | k8) + AC_CONFIG_COMMANDS([mpopt.x86_64],[ + m4 $srcdir/gas/mpopt.x86_64.m4 > mpopt.s + ]) + ;; athlon* | i[[3456]]86 | pentium*) AC_CONFIG_COMMANDS([aesopt.x86],[ m4 $srcdir/gas/aesopt.x86.m4 > aesopt.s @@ -1175,15 +1181,12 @@ AC_DEFUN([BEECRYPT_ASM_SOURCES],[ m4 $srcdir/gas/mpopt.sparcv8plus.m4 > mpopt.s ]) ;; - x86_64) - AC_CONFIG_COMMANDS([mpopt.x86_64],[ - m4 $srcdir/gas/mpopt.x86_64.m4 > mpopt.s - ]) - ;; esac if test "$ac_with_arch" = yes; then # Code is i586-specific! case $bc_target_arch in + x86_64 | athlon64 | athlon-fx | em64t | k8) + ;; athlon* | i[[56]]86 | pentium*) AC_CONFIG_COMMANDS([blowfishopt.i586],[ m4 $srcdir/gas/blowfishopt.i586.m4 > blowfishopt.s diff -urNp beecrypt-4.1.2.org/configure.ac beecrypt-4.1.2/configure.ac --- beecrypt-4.1.2.org/configure.ac 2004-12-21 13:37:56.000000000 +0200 +++ beecrypt-4.1.2/configure.ac 2006-10-24 22:18:01.000000000 +0200 @@ -501,9 +501,11 @@ if test "$ac_enable_debug" != yes; then arm*) CPPFLAGS="$CPPFLAGS -DOPTIMIZE_ARM" ;; + x86_64 | athlon64 | athlon-fx | em64t | k8) + CPPFLAGS="$CPPFLAGS -DOPTIMIZE_X86_64" + ;; athlon*) - CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I386 -DOPTIMIZE_MMX" - CFLAGS="$CFLAGS -mmmx" + CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I686 -DOPTIMIZE_MMX" ;; i386) CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I386" @@ -526,24 +528,23 @@ if test "$ac_enable_debug" != yes; then pentium) CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I586" ;; + pentium-m) + CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I686 -DOPTIMIZE_MMX -DOPTIMIZE_SSE -DOPTIMIZE_SSE2" + ;; pentium-mmx) CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I586 -DOPTIMIZE_MMX" - CFLAGS="$CFLAGS -mmmx" ;; pentiumpro) CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I686" ;; pentium2) CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I686 -DOPTIMIZE_MMX" - CFLAGS="$CFLAGS -mmmx" ;; pentium3) CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I686 -DOPTIMIZE_MMX -DOPTIMIZE_SSE" - CFLAGS="$CFLAGS -msse" ;; pentium4) CPPFLAGS="$CPPFLAGS -DOPTIMIZE_I686 -DOPTIMIZE_MMX -DOPTIMIZE_SSE -DOPTIMIZE_SSE2" - CFLAGS="$CFLAGS -msse2" ;; powerpc) CPPFLAGS="$CPPFLAGS -DOPTIMIZE_POWERPC" @@ -556,15 +557,12 @@ if test "$ac_enable_debug" != yes; then ;; sparcv8) CPPFLAGS="$CPPFLAGS -DOPTIMIZE_SPARCV8" - CFLAGS="$CFLAGS -Wa,-xarch=v8" ;; sparcv8plus*) CPPFLAGS="$CPPFLAGS -DOPTIMIZE_SPARCV8PLUS" - CFLAGS="$CFLAGS -Wa,-xarch=v8plus" ;; sparcv9*) CPPFLAGS="$CPPFLAGS -DOPTIMIZE_SPARCV9" - CFLAGS="$CFLAGS -Wa,-xarch=v9" ;; x86_64) CPPFLAGS="$CPPFLAGS -DOPTIMIZE_X86_64" @@ -612,7 +612,7 @@ case $target_os in linux*) case $bc_target_arch in - powerpc64 | s390x | x86_64) + powerpc64 | s390x | x86_64 | athlon64 | athlon-fx | em64t | k8) bc_libalt="64" ;; esac diff -urNp beecrypt-4.1.2.org/gas/x86.m4 beecrypt-4.1.2/gas/x86.m4 --- beecrypt-4.1.2.org/gas/x86.m4 2004-06-13 14:37:28.000000000 +0300 +++ beecrypt-4.1.2/gas/x86.m4 2006-10-24 22:18:01.000000000 +0200 @@ -48,3 +48,25 @@ define(USE_MMX) define(USE_SSE) define(USE_SSE2) ') +ifelse(ASM_ARCH,pentium-m,` +undefine(`ALIGN') +define(ALIGN,`.p2align 4') +define(USE_MMX) +define(USE_SSE) +define(USE_SSE2) +') +ifelse(ASM_ARCH,athlon64,` +undefine(`USE_MMX') +') +ifelse(ASM_ARCH,x86_64,` +undefine(`USE_MMX') +') +ifelse(ASM_ARCH,athlon-fx,` +undefine(`USE_MMX') +') +ifelse(ASM_ARCH,em64t,` +undefine(`USE_MMX') +') +ifelse(ASM_ARCH,k8,` +undefine(`USE_MMX') +')