diff options
author | Andy Polyakov <appro@openssl.org> | 2016-06-24 12:53:54 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2016-11-14 21:32:05 +0100 |
commit | 2e691f8fa8f2ccc31f49bed51cbe6cad9393bad5 (patch) | |
tree | f7deae917a7321128a3cbd9010324d4941b0f0f9 /crypto/sha/asm/sha512-mips.pl | |
parent | 894c04aa05ba1e64735d7beb9c2a1da93d288e31 (diff) |
FIPS MIPS assembly pack refresh.
Backport CVE-2014-3570 bug and postability fixes.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 10fa6736b137ad55bfcb0e72b4587ec419f1b13e)
Diffstat (limited to 'crypto/sha/asm/sha512-mips.pl')
-rw-r--r-- | crypto/sha/asm/sha512-mips.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/sha/asm/sha512-mips.pl b/crypto/sha/asm/sha512-mips.pl index ba5b250890..00e795b0ad 100644 --- a/crypto/sha/asm/sha512-mips.pl +++ b/crypto/sha/asm/sha512-mips.pl @@ -45,7 +45,7 @@ # ($s0,$s1,$s2,$s3,$s4,$s5,$s6,$s7)=map("\$$_",(16..23)); # ($gp,$sp,$fp,$ra)=map("\$$_",(28..31)); # -$flavour = shift; # supported flavours are o32,n32,64,nubi32,nubi64 +$flavour = shift || "o32"; # supported flavours are o32,n32,64,nubi32,nubi64 if ($flavour =~ /64|n32/i) { $PTR_ADD="dadd"; # incidentally works even on n32 @@ -68,7 +68,7 @@ $pf = ($flavour =~ /nubi/i) ? $t0 : $t2; # ###################################################################### -$big_endian=(`echo MIPSEL | $ENV{CC} -E -P -`=~/MIPSEL/)?1:0; +$big_endian=(`echo MIPSEL | $ENV{CC} -E -`=~/MIPSEL/)?1:0; for (@ARGV) { $output=$_ if (/^\w[\w\-]*\.\w+$/); } open STDOUT,">$output"; @@ -244,7 +244,7 @@ $code.=<<___; .text .set noat -#if !defined(__vxworks) || defined(__pic__) +#if !defined(__mips_eabi) && (!defined(__vxworks) || defined(__pic__)) .option pic2 #endif @@ -351,7 +351,7 @@ $code.=<<___; $ST $G,6*$SZ($ctx) $ST $H,7*$SZ($ctx) - bnel $inp,@X[15],.Loop + bne $inp,@X[15],.Loop $PTR_SUB $Ktbl,`($rounds-16)*$SZ` # rewind $Ktbl $REG_L $ra,$FRAMESIZE-1*$SZREG($sp) |