diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2009-04-06 06:30:02 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2009-04-06 06:30:02 +0000 |
commit | 073d483c6dc92e2ffbcf2dcda6e8363df4e4fc70 (patch) | |
tree | 095b758f01580f779f53c5cc75a34d5ae947aedc | |
parent | cabc17e1a8ef8a434de2ee83ca9c9f82e04756c4 (diff) |
import of OpenSSL 0.9.8k
-rw-r--r-- | lib/libssl/src/crypto/bn/asm/alpha-mont.pl | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/lib/libssl/src/crypto/bn/asm/alpha-mont.pl b/lib/libssl/src/crypto/bn/asm/alpha-mont.pl index 03596e2014d..7a2cc3173b0 100644 --- a/lib/libssl/src/crypto/bn/asm/alpha-mont.pl +++ b/lib/libssl/src/crypto/bn/asm/alpha-mont.pl @@ -41,12 +41,8 @@ $j="s4"; $m1="s5"; $code=<<___; -#ifdef __linux__ -#include <asm/regdef.h> -#else #include <asm.h> #include <regdef.h> -#endif .text @@ -57,15 +53,15 @@ $code=<<___; .align 5 .ent bn_mul_mont bn_mul_mont: - lda sp,-48(sp) + lda sp,-40(sp) stq ra,0(sp) stq s3,8(sp) stq s4,16(sp) stq s5,24(sp) stq fp,32(sp) mov sp,fp - .mask 0x0400f000,-48 - .frame fp,48,ra + .mask 0x0400f000,-40 + .frame fp,40,ra .prologue 0 .align 4 @@ -80,7 +76,7 @@ bn_mul_mont: ldq $aj,8($ap) subq sp,AT,sp ldq $bi,0($bp) # bp[0] - lda AT,-4096(zero) # mov -4096,AT + mov -4096,AT ldq $n0,0($n0) and sp,AT,sp @@ -110,9 +106,9 @@ bn_mul_mont: .align 4 .L1st: .set noreorder - ldq $aj,0($aj) + ldq $aj,($aj) addl $j,1,$j - ldq $nj,0($nj) + ldq $nj,($nj) lda $tp,8($tp) addq $alo,$hi0,$lo0 @@ -163,12 +159,12 @@ bn_mul_mont: .align 4 .Louter: s8addq $i,$bp,$bi - ldq $hi0,0($ap) + ldq $hi0,($ap) ldq $aj,8($ap) - ldq $bi,0($bi) - ldq $hi1,0($np) + ldq $bi,($bi) + ldq $hi1,($np) ldq $nj,8($np) - ldq $tj,0(sp) + ldq $tj,(sp) mulq $hi0,$bi,$lo0 umulh $hi0,$bi,$hi0 @@ -199,10 +195,10 @@ bn_mul_mont: .set noreorder ldq $tj,8($tp) #L0 nop #U1 - ldq $aj,0($aj) #L1 + ldq $aj,($aj) #L1 s8addq $j,$np,$nj #U0 - ldq $nj,0($nj) #L0 + ldq $nj,($nj) #L0 nop #U1 addq $alo,$hi0,$lo0 #L1 lda $tp,8($tp) @@ -251,7 +247,7 @@ bn_mul_mont: addq $hi1,v0,$hi1 addq $hi1,$hi0,$lo1 - stq $j,0($tp) + stq $j,($tp) cmpult $lo1,$hi0,$hi1 addq $lo1,$tj,$lo1 cmpult $lo1,$tj,AT @@ -269,8 +265,8 @@ bn_mul_mont: mov 0,$hi0 # clear borrow bit .align 4 -.Lsub: ldq $lo0,0($tp) - ldq $lo1,0($np) +.Lsub: ldq $lo0,($tp) + ldq $lo1,($np) lda $tp,8($tp) lda $np,8($np) subq $lo0,$lo1,$lo1 # tp[i]-np[i] @@ -278,7 +274,7 @@ bn_mul_mont: subq $lo1,$hi0,$lo0 cmpult $lo1,$lo0,$hi0 or $hi0,AT,$hi0 - stq $lo0,0($rp) + stq $lo0,($rp) cmpult $tp,$tj,v0 lda $rp,8($rp) bne v0,.Lsub @@ -292,7 +288,7 @@ bn_mul_mont: bis $bp,$ap,$ap # ap=borrow?tp:rp .align 4 -.Lcopy: ldq $aj,0($ap) # copy or in-place refresh +.Lcopy: ldq $aj,($ap) # copy or in-place refresh lda $tp,8($tp) lda $rp,8($rp) lda $ap,8($ap) @@ -310,11 +306,11 @@ bn_mul_mont: ldq s4,16(sp) ldq s5,24(sp) ldq fp,32(sp) - lda sp,48(sp) + lda sp,40(sp) ret (ra) .end bn_mul_mont -.ascii "Montgomery Multiplication for Alpha, CRYPTOGAMS by <appro\@openssl.org>" -.align 2 +.rdata +.asciiz "Montgomery Multiplication for Alpha, CRYPTOGAMS by <appro\@openssl.org>" ___ print $code; |