aes/asm/aesv8-armx.pl: optimize for Cortex-A5x.
[openssl.git] / crypto / sha / asm / sha1-armv8.pl
index deb1238d361e45a148d7c813ab7b9b9534de9e30..bdf48b8ec4fbf0ea0c0a6dd97d5eedbb2199fa73 100644 (file)
 #
 #              hardware-assisted       software(*)
 # Apple A7     2.31                    4.13 (+14%)
 #
 #              hardware-assisted       software(*)
 # Apple A7     2.31                    4.13 (+14%)
-# Cortex-A53   2.19                    8.73 (+108%)
+# Cortex-A53   2.24                    8.03 (+97%)
 # Cortex-A57   2.35                    7.88 (+74%)
 #
 # (*)  Software results are presented mostly for reference purposes.
 
 $flavour = shift;
 # Cortex-A57   2.35                    7.88 (+74%)
 #
 # (*)  Software results are presented mostly for reference purposes.
 
 $flavour = shift;
-open STDOUT,">".shift;
+$output  = shift;
+
+$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
+( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or
+( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
+die "can't locate arm-xlate.pl";
+
+open OUT,"| \"$^X\" $xlate $flavour $output";
+*STDOUT=*OUT;
 
 ($ctx,$inp,$num)=("x0","x1","x2");
 @Xw=map("w$_",(3..17,19));
 
 ($ctx,$inp,$num)=("x0","x1","x2");
 @Xw=map("w$_",(3..17,19));
@@ -154,6 +162,7 @@ $code.=<<___;
 
 .text
 
 
 .text
 
+.extern        OPENSSL_armcap_P
 .globl sha1_block_data_order
 .type  sha1_block_data_order,%function
 .align 6
 .globl sha1_block_data_order
 .type  sha1_block_data_order,%function
 .align 6