aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/whrlpool/asm/wp-mmx.pl
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-02-22 21:39:56 +0100
committermarha <marha@users.sourceforge.net>2015-02-22 21:39:56 +0100
commit462f18c7b25fe3e467f837647d07ab0a78aa8d2b (patch)
treefc8013c0a1bac05a1945846c1697e973f4c35013 /openssl/crypto/whrlpool/asm/wp-mmx.pl
parent36f711ee12b6dd5184198abed3aa551efb585587 (diff)
downloadvcxsrv-462f18c7b25fe3e467f837647d07ab0a78aa8d2b.tar.gz
vcxsrv-462f18c7b25fe3e467f837647d07ab0a78aa8d2b.tar.bz2
vcxsrv-462f18c7b25fe3e467f837647d07ab0a78aa8d2b.zip
Merged origin/release (checked in because wanted to merge new stuff)
Diffstat (limited to 'openssl/crypto/whrlpool/asm/wp-mmx.pl')
-rw-r--r--openssl/crypto/whrlpool/asm/wp-mmx.pl42
1 files changed, 22 insertions, 20 deletions
diff --git a/openssl/crypto/whrlpool/asm/wp-mmx.pl b/openssl/crypto/whrlpool/asm/wp-mmx.pl
index cb2381c22..c584e5b92 100644
--- a/openssl/crypto/whrlpool/asm/wp-mmx.pl
+++ b/openssl/crypto/whrlpool/asm/wp-mmx.pl
@@ -118,34 +118,36 @@ $tbl="ebp";
&movq (@mm[0],&QWP(2048*$SCALE,$tbl,"esi",8)); # rc[r]
&mov ("eax",&DWP(0,"esp"));
&mov ("ebx",&DWP(4,"esp"));
+ &movz ("ecx",&LB("eax"));
+ &movz ("edx",&HB("eax"));
for($i=0;$i<8;$i++) {
my $func = ($i==0)? \&movq : \&pxor;
- &movb (&LB("ecx"),&LB("eax"));
- &movb (&LB("edx"),&HB("eax"));
+ &shr ("eax",16);
&scale ("esi","ecx");
+ &movz ("ecx",&LB("eax"));
&scale ("edi","edx");
- &shr ("eax",16);
+ &movz ("edx",&HB("eax"));
&pxor (@mm[0],&QWP(&row(0),$tbl,"esi",8));
&$func (@mm[1],&QWP(&row(1),$tbl,"edi",8));
- &movb (&LB("ecx"),&LB("eax"));
- &movb (&LB("edx"),&HB("eax"));
&mov ("eax",&DWP(($i+1)*8,"esp"));
&scale ("esi","ecx");
+ &movz ("ecx",&LB("ebx"));
&scale ("edi","edx");
+ &movz ("edx",&HB("ebx"));
&$func (@mm[2],&QWP(&row(2),$tbl,"esi",8));
&$func (@mm[3],&QWP(&row(3),$tbl,"edi",8));
- &movb (&LB("ecx"),&LB("ebx"));
- &movb (&LB("edx"),&HB("ebx"));
+ &shr ("ebx",16);
&scale ("esi","ecx");
+ &movz ("ecx",&LB("ebx"));
&scale ("edi","edx");
- &shr ("ebx",16);
+ &movz ("edx",&HB("ebx"));
&$func (@mm[4],&QWP(&row(4),$tbl,"esi",8));
&$func (@mm[5],&QWP(&row(5),$tbl,"edi",8));
- &movb (&LB("ecx"),&LB("ebx"));
- &movb (&LB("edx"),&HB("ebx"));
&mov ("ebx",&DWP(($i+1)*8+4,"esp"));
&scale ("esi","ecx");
+ &movz ("ecx",&LB("eax"));
&scale ("edi","edx");
+ &movz ("edx",&HB("eax"));
&$func (@mm[6],&QWP(&row(6),$tbl,"esi",8));
&$func (@mm[7],&QWP(&row(7),$tbl,"edi",8));
push(@mm,shift(@mm));
@@ -154,32 +156,32 @@ for($i=0;$i<8;$i++) {
for($i=0;$i<8;$i++) { &movq(&QWP($i*8,"esp"),@mm[$i]); } # K=L
for($i=0;$i<8;$i++) {
- &movb (&LB("ecx"),&LB("eax"));
- &movb (&LB("edx"),&HB("eax"));
+ &shr ("eax",16);
&scale ("esi","ecx");
+ &movz ("ecx",&LB("eax"));
&scale ("edi","edx");
- &shr ("eax",16);
+ &movz ("edx",&HB("eax"));
&pxor (@mm[0],&QWP(&row(0),$tbl,"esi",8));
&pxor (@mm[1],&QWP(&row(1),$tbl,"edi",8));
- &movb (&LB("ecx"),&LB("eax"));
- &movb (&LB("edx"),&HB("eax"));
&mov ("eax",&DWP(64+($i+1)*8,"esp")) if ($i<7);
&scale ("esi","ecx");
+ &movz ("ecx",&LB("ebx"));
&scale ("edi","edx");
+ &movz ("edx",&HB("ebx"));
&pxor (@mm[2],&QWP(&row(2),$tbl,"esi",8));
&pxor (@mm[3],&QWP(&row(3),$tbl,"edi",8));
- &movb (&LB("ecx"),&LB("ebx"));
- &movb (&LB("edx"),&HB("ebx"));
+ &shr ("ebx",16);
&scale ("esi","ecx");
+ &movz ("ecx",&LB("ebx"));
&scale ("edi","edx");
- &shr ("ebx",16);
+ &movz ("edx",&HB("ebx"));
&pxor (@mm[4],&QWP(&row(4),$tbl,"esi",8));
&pxor (@mm[5],&QWP(&row(5),$tbl,"edi",8));
- &movb (&LB("ecx"),&LB("ebx"));
- &movb (&LB("edx"),&HB("ebx"));
&mov ("ebx",&DWP(64+($i+1)*8+4,"esp")) if ($i<7);
&scale ("esi","ecx");
+ &movz ("ecx",&LB("eax"));
&scale ("edi","edx");
+ &movz ("edx",&HB("eax"));
&pxor (@mm[6],&QWP(&row(6),$tbl,"esi",8));
&pxor (@mm[7],&QWP(&row(7),$tbl,"edi",8));
push(@mm,shift(@mm));