Minor formatting fixes in crypto/sha/asm.

This commit is contained in:
Andy Polyakov 2007-09-18 21:12:02 +00:00
parent cf2bc94e5c
commit b5e5760d01
2 changed files with 5 additions and 5 deletions

View File

@ -45,17 +45,17 @@ $Xoff=&DWP(32,"esp");
$K256="ebp";
sub BODY_00_15() {
my $in_16_64=shift;
my $in_16_63=shift;
&mov ("ecx",$E);
&add ($T,&DWP(4*(8+15+16-9),"esp")) if ($in_16_64); # T += X[-7]
&add ($T,&DWP(4*(8+15+16-9),"esp")) if ($in_16_63); # T += X[-7]
&ror ("ecx",6);
&mov ("edi",$E);
&ror ("edi",11);
&mov ("esi",$Foff);
&xor ("ecx","edi");
&ror ("edi",25-11);
&mov (&DWP(4*(8+15),"esp"),$T) if ($in_16_64); # save X[0]
&mov (&DWP(4*(8+15),"esp"),$T) if ($in_16_63); # save X[0]
&xor ("ecx","edi"); # Sigma1(e)
&mov ("edi",$Goff);
&add ($T,"ecx"); # T += Sigma1(e)
@ -92,7 +92,7 @@ sub BODY_00_15() {
&add ($K256,4);
&add ($A,$T); # h += T
&mov ($T,&DWP(4*(8+15+16-1),"esp")) if ($in_16_64); # preload T
&mov ($T,&DWP(4*(8+15+16-1),"esp")) if ($in_16_63); # preload T
&add ($E,"esi"); # d += K256[i]
&add ($A,"esi"); # h += K256[i]
}

View File

@ -104,7 +104,7 @@ $code.=<<___;
orreq $Ktbl,$Ktbl,#1
ldr $t2,[sp,#$Boff+0] @ b.lo
ldr $t3,[sp,#$Coff+0] @ c.lo
ldr $t3,[sp,#$Coff+0] @ c.lo
@ Sigma0(x) (ROTR((x),28) ^ ROTR((x),34) ^ ROTR((x),39))
@ LO lo>>28^hi<<4 ^ hi>>2^lo<<30 ^ hi>>7^lo<<25
@ HI hi>>28^lo<<4 ^ lo>>2^hi<<30 ^ lo>>7^hi<<25