Yet another ARM update. It appears to be more appropriate to make
authorAndy Polyakov <appro@openssl.org>
Thu, 27 Sep 2007 16:27:03 +0000 (16:27 +0000)
committerAndy Polyakov <appro@openssl.org>
Thu, 27 Sep 2007 16:27:03 +0000 (16:27 +0000)
developers responsible for -march choice.

Configure
config
crypto/aes/asm/aes-armv4.pl
crypto/bn/asm/armv4-mont.pl
crypto/sha/asm/sha1-armv4-large.pl
crypto/sha/asm/sha256-armv4.pl
crypto/sha/asm/sha512-armv4.pl

index 79ffcef6318a963a928d67050b2c8f6bf7638ef9..72005414d7b53f65cfa2842e46349045da36071c 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -324,7 +324,8 @@ my %table=(
 # throw in -D[BL]_ENDIAN, whichever appropriate...
 "linux-generic32","gcc:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 "linux-ppc",   "gcc:-DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:ppccpuid_linux32.o:linux_ppc32.o linux_ppc32-mont.o:::::sha1-ppc_linux32.o sha256-ppc_linux32.o:::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-# It's appropriate to complement it with -march, which is done in ./config...
+# It's believed that majority of ARM toolchains predefine appropriate -march.
+# If you compiler does not, do complement config command line with one!
 "linux-armv4", "gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 #### IA-32 targets...
 "linux-ia32-icc",      "icc:-DL_ENDIAN -DTERMIO -O2 -no_cpprt::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff --git a/config b/config
index bb76191d58713e4ad0711b346d0cb32e954b7808..e77baa09427da7cc627ad182e0b599d6ec8bb858 100755 (executable)
--- a/config
+++ b/config
@@ -612,9 +612,7 @@ case "$GUESSOS" in
        options="$options -DB_ENDIAN -mschedule=$CPUSCHEDULE -march=$CPUARCH"
        OUT="linux-generic32" ;;
   armv[1-3]*-*-linux2) OUT="linux-generic32" ;;
-  # -march=armv4t is expected to generate code binary compatible with
-  # vanilla armv4 but interoperable with armv4t.
-  arm*-*-linux2) OUT="linux-armv4"; options="$options -march=armv4t" ;;
+  arm*-*-linux2) OUT="linux-armv4" ;;
   sh*b-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
   sh*-*-linux2)  OUT="linux-generic32"; options="$options -DL_ENDIAN" ;;
   m68k*-*-linux2) OUT="linux-generic32"; options="$options -DB_ENDIAN" ;;
index 69867e74102def3414b67b9cd2fc7b5e566d37e5..15742c1ec54b3a8ce01941f7672f94fbf3f99249 100644 (file)
@@ -1026,4 +1026,5 @@ _armv4_AES_decrypt:
 .asciz "AES for ARMv4, CRYPTOGAMS by <appro\@openssl.org>"
 ___
 
+$code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm;   # make it possible to compile with -march=armv4
 print $code;
index 47fbd387e49eb39f8b540ff4a9daf600ecc86330..05d5dc1a4822f26d38181f01793b9d9147c00f41 100644 (file)
@@ -195,5 +195,6 @@ bn_mul_mont:
 .asciz "Montgomery multiplication for ARMv4, CRYPTOGAMS by <appro\@openssl.org>"
 ___
 
+$code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm;   # make it possible to compile with -march=armv4
 print $code;
 close STDOUT;
index 436eb36d70b5dab2e76146514846ffed9f9d1c45..d468be35da64d3c277e649f873a49909f443eb09 100644 (file)
@@ -226,5 +226,6 @@ $code.=<<___;
 .asciz "SHA1 block transform for ARMv4, CRYPTOGAMS by <appro\@openssl.org>"
 ___
 
+$code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm;   # make it possible to compile with -march=armv4
 print $code;
 close STDOUT; # enforce flush
index 0c9d999de998c5f11b5bfb53f320afa5c8e255c6..853ca31e48aa9ad188e6e4b8ab01bd5fba67749b 100644 (file)
@@ -175,5 +175,6 @@ $code.=<<___;
 ___
 
 $code =~ s/\`([^\`]*)\`/eval $1/gem;
+$code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm;   # make it possible to compile with -march=armv4
 print $code;
 close STDOUT; # enforce flush
index 230e78d7ef84c748a363bc63e882654a9fd42ea1..f27e9cd31953a8f86bc6212a2addfdb289cedce0 100644 (file)
@@ -393,5 +393,6 @@ $code.=<<___;
 ___
 
 $code =~ s/\`([^\`]*)\`/eval $1/gem;
+$code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm;   # make it possible to compile with -march=armv4
 print $code;
 close STDOUT; # enforce flush