Reduce version skew.
[openssl.git] / crypto / whrlpool / asm / wp-mmx.pl
index ee7734b2a3e72e8abcaf8a4e7589cb69cafd2e72..cb2381c22ba12aed4a9411bb181b7e16e30ec45d 100644 (file)
@@ -45,7 +45,8 @@
 #      non-MMX implementation would actually pay off, but till
 #      opposite is proved "unlikely" is assumed.
 
-push(@INC,"../../perlasm");
+$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
+push(@INC,"${dir}","${dir}../../perlasm");
 require "x86asm.pl";
 
 &asm_init($ARGV[0],"wp-mmx.pl");
@@ -114,11 +115,11 @@ $tbl="ebp";
        &mov    (&DWP(12,"ebx"),"esi");         # zero round counter
 
 &set_label("round",16);
-       &movq   (@mm[0],&DWP(2048*$SCALE,$tbl,"esi",8));        # rc[r]
+       &movq   (@mm[0],&QWP(2048*$SCALE,$tbl,"esi",8));        # rc[r]
        &mov    ("eax",&DWP(0,"esp"));
        &mov    ("ebx",&DWP(4,"esp"));
 for($i=0;$i<8;$i++) {
-    my $func = ($i==0)? movq : pxor;
+    my $func = ($i==0)? \&movq : \&pxor;
        &movb   (&LB("ecx"),&LB("eax"));
        &movb   (&LB("edx"),&HB("eax"));
        &scale  ("esi","ecx");
@@ -488,5 +489,5 @@ for($i=0;$i<8;$i++) {
        &L(0xfb,0xee,0x7c,0x66,0xdd,0x17,0x47,0x9e);
        &L(0xca,0x2d,0xbf,0x07,0xad,0x5a,0x83,0x33);
 
-&function_end_B("whrilpool_block_mmx");
+&function_end_B("whirlpool_block_mmx");
 &asm_finish();