diff options
author | Andy Polyakov <appro@openssl.org> | 2009-12-27 21:05:19 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2009-12-27 21:05:19 +0000 |
commit | b57599b70c8be6523f38d32d9c96ff466fb01679 (patch) | |
tree | 0af248dc4993c1bacbd1c3f1fbd27d0072372f64 /crypto/sha/asm | |
parent | cb3b9b132336d7931c047a95a0d7638b8e470e55 (diff) |
Update sha512-parisc.pl and add make rules.
Diffstat (limited to 'crypto/sha/asm')
-rwxr-xr-x | crypto/sha/asm/sha512-parisc.pl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/crypto/sha/asm/sha512-parisc.pl b/crypto/sha/asm/sha512-parisc.pl index da1282a076..9ccbdaaf82 100755 --- a/crypto/sha/asm/sha512-parisc.pl +++ b/crypto/sha/asm/sha512-parisc.pl @@ -391,7 +391,7 @@ $code.=<<___; shd $elo,$ehi,$Sigma1[0],$t1 addc $Xhi,$hhi,$hhi ; h += X[i] shd $ehi,$elo,$Sigma1[1],$t2 - ldw,ma 8($Tbl),$Xhi + ldwm 8($Tbl),$Xhi shd $elo,$ehi,$Sigma1[1],$t3 ldw -4($Tbl),$Xlo ; load K[i] xor $t2,$t0,$t0 @@ -694,9 +694,10 @@ my $ldd = sub { my ($mod,$args) = @_; my $orig = "ldd$mod\t$args"; - if ($args =~ /([0-9]+)\(%r([0-9]+)\),%r([0-9]+)/) # format 3 suffices - { my $opcode=(0x14<<26)|($2<<21)|($3<<16)|($1<<1); - $opcode|=0x8 if ($mod eq ",ma"); + if ($args =~ /(\-[0-9]+)\(%r([0-9]+)\),%r([0-9]+)/) # format 3 suffices + { my $opcode=(0x14<<26)|($2<<21)|($3<<16)|(($1&0x1FF8)<<1)|(($1>>13)&1); + $opcode|=(1<<3) if ($mod =~ /^,m/); + $opcode|=(1<<2) if ($mod =~ /^,mb/); sprintf "\t.WORD\t0x%08x\t; %s",$opcode,$orig; } else { "\t".$orig; } @@ -706,9 +707,9 @@ my $std = sub { my ($mod,$args) = @_; my $orig = "std$mod\t$args"; - if ($args =~ /%r([0-9]+),([0-9]+)\(%r([0-9]+)\)/) # format 3 suffices - { sprintf "\t.WORD\t0x%08x\t; %s", - (0x1c<<26)|($3<<21)|($1<<16)|($2<<1),$orig; + if ($args =~ /%r([0-9]+),(\-[0-9]+)\(%r([0-9]+)\)/) # format 3 suffices + { my $opcode=(0x1c<<26)|($3<<21)|($1<<16)|(($2&0x1FF8)<<1)|(($2>>13)&1); + sprintf "\t.WORD\t0x%08x\t; %s",$opcode,$orig; } else { "\t".$orig; } }; |