summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornelsonb%netscape.com <devnull@localhost>2001-11-01 02:40:05 +0000
committernelsonb%netscape.com <devnull@localhost>2001-11-01 02:40:05 +0000
commit5595999bae5d97d7c71eb3fac278abd8d54bb616 (patch)
tree1bf02d369bdbb594f2e0a9150ae29a00f08df4ba
parenta74b4c5abcb198a09304bba4150783a615d6b151 (diff)
downloadnss-hg-5595999bae5d97d7c71eb3fac278abd8d54bb616.tar.gz
Merge in fixes to montmulf code from trunk. Fixes came from Sun.
-rw-r--r--security/nss/lib/freebl/mpi/montmulf.c2
-rw-r--r--security/nss/lib/freebl/mpi/montmulfv8.s14
-rw-r--r--security/nss/lib/freebl/mpi/montmulfv9.s6
3 files changed, 11 insertions, 11 deletions
diff --git a/security/nss/lib/freebl/mpi/montmulf.c b/security/nss/lib/freebl/mpi/montmulf.c
index 0cdacce88..2cf0825f8 100644
--- a/security/nss/lib/freebl/mpi/montmulf.c
+++ b/security/nss/lib/freebl/mpi/montmulf.c
@@ -196,7 +196,7 @@ int i;
if(i32[len]>0) i=-1;
else
{
- for(i=len-1; i>=0; i++)
+ for(i=len-1; i>=0; i--)
{
if(i32[i]!=nint[i]) break;
}
diff --git a/security/nss/lib/freebl/mpi/montmulfv8.s b/security/nss/lib/freebl/mpi/montmulfv8.s
index 39568d98b..f6b90dfd8 100644
--- a/security/nss/lib/freebl/mpi/montmulfv8.s
+++ b/security/nss/lib/freebl/mpi/montmulfv8.s
@@ -836,7 +836,7 @@ TwoToMinus32:
! 191 ! else
! 192 ! {
-! 193 ! for(i=len-1; i>=0; i++)
+! 193 ! for(i=len-1; i>=0; i--)
/* 0x0024 193 */ sub %o2,1,%g4
/* 0x0028 */ sll %g4,2,%g1
@@ -852,9 +852,9 @@ TwoToMinus32:
/* 0x0040 193 */ add %o0,%g1,%g3
.L900000510:
/* 0x0044 195 */ ld [%g3],%o2
-/* 0x0048 */ add %g4,1,%g1
-/* 0x004c */ add %g2,4,%g2
-/* 0x0050 */ add %g3,4,%g3
+/* 0x0048 */ sub %g4,1,%g1
+/* 0x004c */ sub %g2,4,%g2
+/* 0x0050 */ sub %g3,4,%g3
/* 0x0054 */ cmp %o2,%o5
/* 0x0058 */ bne,pn %icc,.L77000182
/* 0x005c */ nop
@@ -1758,9 +1758,9 @@ TwoToMinus32:
/* 0x0a14 */ ld [%o1],%g2
.L900000648:
/* 0x0a18 */ ld [%o4],%g3
-/* 0x0a1c */ add %o5,1,%o0
-/* 0x0a20 */ add %o1,4,%o1
-/* 0x0a24 */ add %o4,4,%o4
+/* 0x0a1c */ sub %o5,1,%o0
+/* 0x0a20 */ sub %o1,4,%o1
+/* 0x0a24 */ sub %o4,4,%o4
/* 0x0a28 */ cmp %g3,%g2
/* 0x0a2c */ bne,pn %icc,.L77000244
/* 0x0a30 */ nop
diff --git a/security/nss/lib/freebl/mpi/montmulfv9.s b/security/nss/lib/freebl/mpi/montmulfv9.s
index a1ff27044..3a0a17f7e 100644
--- a/security/nss/lib/freebl/mpi/montmulfv9.s
+++ b/security/nss/lib/freebl/mpi/montmulfv9.s
@@ -1164,7 +1164,7 @@ TwoToMinus32:
! 191 ! else
! 192 ! {
-! 193 ! for(i=len-1; i>=0; i++)
+! 193 ! for(i=len-1; i>=0; i--)
/* 0x0030 193 */ sub %o1,1,%o2
/* 0x0034 */ cmp %o2,0
@@ -1176,7 +1176,7 @@ TwoToMinus32:
! 195 ! if(i32[i]!=nint[i]) break;
/* 0x0040 195 */ sllx %g2,2,%g2
-/* 0x0044 */ add %o2,1,%o0
+/* 0x0044 */ sub %o2,1,%o0
/* 0x0048 */ ld [%i1+%g2],%g3
/* 0x004c */ ld [%i2+%g2],%g2
/* 0x0050 */ cmp %g2,%g3
@@ -2240,7 +2240,7 @@ TwoToMinus32:
/* 0x0bcc */ sra %o1,0,%g2
.L900000645:
/* 0x0bd0 */ sllx %g2,2,%g2
-/* 0x0bd4 */ add %o1,1,%o0
+/* 0x0bd4 */ sub %o1,1,%o0
/* 0x0bd8 */ ld [%l3+%g2],%g3
/* 0x0bdc */ ld [%l2+%g2],%g2
/* 0x0be0 */ cmp %g2,%g3