summaryrefslogtreecommitdiffstats
path: root/crypto/bn/asm
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2005-10-22 17:57:18 +0000
committerAndy Polyakov <appro@openssl.org>2005-10-22 17:57:18 +0000
commit4d524040bc81d2db46a5530ba10a98686ab1c3ca (patch)
tree1e2a3deb777f1a4ab5e16398bf0387fdd0c6623f /crypto/bn/asm
parent0fe120ba25ad7d7d93f3fad17640556503426186 (diff)
Change bn_mul_mont declaration and BN_MONT_CTX. Update CHANGES.
Diffstat (limited to 'crypto/bn/asm')
-rwxr-xr-xcrypto/bn/asm/sparcv9a-mont.pl4
-rwxr-xr-xcrypto/bn/asm/x86-mont.pl3
-rwxr-xr-xcrypto/bn/asm/x86_64-mont.pl4
3 files changed, 7 insertions, 4 deletions
diff --git a/crypto/bn/asm/sparcv9a-mont.pl b/crypto/bn/asm/sparcv9a-mont.pl
index efdf03b5f0..3855295c85 100755
--- a/crypto/bn/asm/sparcv9a-mont.pl
+++ b/crypto/bn/asm/sparcv9a-mont.pl
@@ -70,7 +70,7 @@ $rp="%i0"; # BN_ULONG *rp,
$ap="%i1"; # const BN_ULONG *ap,
$bp="%i2"; # const BN_ULONG *bp,
$np="%i3"; # const BN_ULONG *np,
-$n0="%i4"; # BN_ULONG n0,
+$n0="%i4"; # const BN_ULONG *n0,
$num="%i5"; # int num);
$tp="%l0";
@@ -125,7 +125,7 @@ $fname:
sethi %hi(0xffff),$mask
sll $num,3,$num ! num*=8
or $mask,%lo(0xffff),$mask
- mov %i4,$n0 ! reassigned, remember?
+ ldx [%i4],$n0 ! reassigned, remember?
add %sp,$bias,%o0 ! real top of stack
sll $num,2,%o1
diff --git a/crypto/bn/asm/x86-mont.pl b/crypto/bn/asm/x86-mont.pl
index e250e9907c..8d01b7a87f 100755
--- a/crypto/bn/asm/x86-mont.pl
+++ b/crypto/bn/asm/x86-mont.pl
@@ -66,7 +66,7 @@ if($sse2) {
&mov ("ebx",&wparam(1)); # const BN_ULONG *ap
&mov ("ecx",&wparam(2)); # const BN_ULONG *bp
&mov ("edx",&wparam(3)); # const BN_ULONG *np
- &mov ("esi",&wparam(4)); # BN_ULONG n0
+ &mov ("esi",&wparam(4)); # const BN_ULONG *n0
&mov ($num,&wparam(5)); # int num
&mov ("edi","esp"); # saved stack pointer!
@@ -78,6 +78,7 @@ if($sse2) {
&sub ($num,1); # num is restored to its original value
# and will remain constant from now...
+ &mov ("esi",&DWP(0,"esi")); # pull n0[0]
&mov ($_rp,"eax"); # ... save a copy of argument block
&mov ($_ap,"ebx");
&mov ($_bp,"ecx");
diff --git a/crypto/bn/asm/x86_64-mont.pl b/crypto/bn/asm/x86_64-mont.pl
index f3d112f8ff..e6943b5343 100755
--- a/crypto/bn/asm/x86_64-mont.pl
+++ b/crypto/bn/asm/x86_64-mont.pl
@@ -22,7 +22,7 @@ $rp="%rdi"; # BN_ULONG *rp,
$ap="%rsi"; # const BN_ULONG *ap,
$bp="%rdx"; # const BN_ULONG *bp,
$np="%rcx"; # const BN_ULONG *np,
-$n0="%r8"; # BN_ULONG n0,
+$n0="%r8"; # const BN_ULONG *n0,
$num="%r9"; # int num);
$lo0="%r10";
$hi0="%r11";
@@ -55,6 +55,8 @@ bn_mul_mont:
mov %rbp,8(%rsp,$num,8) # tp[num+1]=%rsp
mov %rdx,$bp # $bp reassigned, remember?
+ mov ($n0),$n0 # pull n0[0] value
+
xor $i,$i # i=0
xor $j,$j # j=0