X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fcast%2Fasm%2Fcast-586.pl;h=ec2eab179d536d2cf3c5b8417377201340393de6;hp=6be0bfe57245e75fd0f90fafaffffcf4de51bf03;hb=ae4af7a067531245c20f032afe61a68d60d39d11;hpb=2613c1fa2f08814cd276800008b5a20c159ea7ff diff --git a/crypto/cast/asm/cast-586.pl b/crypto/cast/asm/cast-586.pl index 6be0bfe572..ec2eab179d 100644 --- a/crypto/cast/asm/cast-586.pl +++ b/crypto/cast/asm/cast-586.pl @@ -1,9 +1,13 @@ #!/usr/local/bin/perl -# define for pentium pro friendly version +# This flag makes the inner loop one cycle longer, but generates +# code that runs %30 faster on the pentium pro/II, 44% faster +# of PIII, while only %7 slower on the pentium. +# By default, this flag is on. $ppro=1; -push(@INC,"perlasm","../../perlasm"); +$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; +push(@INC,"${dir}","${dir}../../perlasm"); require "x86asm.pl"; require "cbc.pl"; @@ -139,11 +143,11 @@ sub E_CAST { &rotl( $tmp4, &LB($tmp1)); if ($ppro) { - &mov( $tmp2, $tmp4); # B &xor( $tmp1, $tmp1); + &mov( $tmp2, 0xff); &movb( &LB($tmp1), &HB($tmp4)); # A - &and( $tmp2, 0xff); + &and( $tmp2, $tmp4); &shr( $tmp4, 16); # &xor( $tmp3, $tmp3);