diff options
Diffstat (limited to 'crypto/aes/asm')
-rw-r--r-- | crypto/aes/asm/aes-mips.pl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/crypto/aes/asm/aes-mips.pl b/crypto/aes/asm/aes-mips.pl index 77dfe1ac9b..c63cdb7f0e 100644 --- a/crypto/aes/asm/aes-mips.pl +++ b/crypto/aes/asm/aes-mips.pl @@ -57,6 +57,7 @@ $flavour = shift || "o32"; # supported flavours are o32,n32,64,nubi32,nubi64 if ($flavour =~ /64|n32/i) { + $PTR_LA="dla"; $PTR_ADD="dadd"; # incidentally works even on n32 $PTR_SUB="dsub"; # incidentally works even on n32 $PTR_INS="dins"; @@ -65,6 +66,7 @@ if ($flavour =~ /64|n32/i) { $PTR_SLL="dsll"; # incidentally works even on n32 $SZREG=8; } else { + $PTR_LA="la"; $PTR_ADD="add"; $PTR_SUB="sub"; $PTR_INS="ins"; @@ -110,7 +112,7 @@ ___ {{{ my $FRAMESIZE=16*$SZREG; -my $SAVED_REGS_MASK = ($flavour =~ /nubi/i) ? 0xc0fff008 : 0xc0ff0000; +my $SAVED_REGS_MASK = ($flavour =~ /nubi/i) ? "0xc0fff008" : "0xc0ff0000"; my ($inp,$out,$key,$Tbl,$s0,$s1,$s2,$s3)=($a0,$a1,$a2,$a3,$a4,$a5,$a6,$a7); my ($i0,$i1,$i2,$i3)=($at,$t0,$t1,$t2); @@ -646,7 +648,7 @@ $code.=<<___ if ($flavour !~ /o32/i); # non-o32 PIC-ification ___ $code.=<<___; .set reorder - la $Tbl,AES_Te # PIC-ified 'load address' + $PTR_LA $Tbl,AES_Te # PIC-ified 'load address' lwl $s0,0+$MSB($inp) lwl $s1,4+$MSB($inp) @@ -1217,7 +1219,7 @@ $code.=<<___ if ($flavour !~ /o32/i); # non-o32 PIC-ification ___ $code.=<<___; .set reorder - la $Tbl,AES_Td # PIC-ified 'load address' + $PTR_LA $Tbl,AES_Td # PIC-ified 'load address' lwl $s0,0+$MSB($inp) lwl $s1,4+$MSB($inp) @@ -1267,7 +1269,7 @@ ___ {{{ my $FRAMESIZE=8*$SZREG; -my $SAVED_REGS_MASK = ($flavour =~ /nubi/i) ? 0xc000f008 : 0xc0000000; +my $SAVED_REGS_MASK = ($flavour =~ /nubi/i) ? "0xc000f008" : "0xc0000000"; my ($inp,$bits,$key,$Tbl)=($a0,$a1,$a2,$a3); my ($rk0,$rk1,$rk2,$rk3,$rk4,$rk5,$rk6,$rk7)=($a4,$a5,$a6,$a7,$s0,$s1,$s2,$s3); @@ -1556,7 +1558,7 @@ $code.=<<___ if ($flavour !~ /o32/i); # non-o32 PIC-ification ___ $code.=<<___; .set reorder - la $Tbl,AES_Te4 # PIC-ified 'load address' + $PTR_LA $Tbl,AES_Te4 # PIC-ified 'load address' bal _mips_AES_set_encrypt_key @@ -1611,7 +1613,7 @@ $code.=<<___ if ($flavour !~ /o32/i); # non-o32 PIC-ification ___ $code.=<<___; .set reorder - la $Tbl,AES_Te4 # PIC-ified 'load address' + $PTR_LA $Tbl,AES_Te4 # PIC-ified 'load address' bal _mips_AES_set_encrypt_key |