diff --git a/mozilla/security/nss/lib/freebl/mpi/mpi_hp.c b/mozilla/security/nss/lib/freebl/mpi/mpi_hp.c index 3cb7c1e2c0f..50c7430b24a 100644 --- a/mozilla/security/nss/lib/freebl/mpi/mpi_hp.c +++ b/mozilla/security/nss/lib/freebl/mpi/mpi_hp.c @@ -29,7 +29,7 @@ * the GPL. If you do not delete the provisions above, a recipient * may use your version of this file under either the MPL or the * GPL. - * $Id: mpi_hp.c,v 1.1 2000-12-27 01:48:25 nelsonb%netscape.com Exp $ + * $Id: mpi_hp.c,v 1.2 2001-01-08 01:01:35 nelsonb%netscape.com Exp $ */ /* This file contains routines that perform vector multiplication. */ @@ -65,6 +65,13 @@ s_mpv_sqr_add_prop(const mp_digit *pa, mp_size a_len, mp_digit *ps) } #define MAX_STACK_DIGITS 258 +#define MULTACC512_LEN (512 / MP_DIGIT_BIT) +#define HP_MPY_ADD_FN (a_len == MULTACC512_LEN ? multacc512 : maxpy_little) +/* temporary hack XXX +** prime generator fails when using multacc512 so disable it for now. +*/ +#undef HP_MPY_ADD_FN +#define HP_MPY_ADD_FN maxpy_little /* c = a * b */ void @@ -85,7 +92,7 @@ s_mpv_mul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c) a = px; } s_mp_setz(c, a_len + 1); - (a_len == 8 ? multacc512 : maxpy_little)(a_len, &b, a, c); + HP_MPY_ADD_FN(a_len, &b, a, c); if (px != x && px) { memset(px, 0, xSize); free(px); @@ -97,7 +104,7 @@ void s_mpv_mul_d_add(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c) { c[a_len] = 0; /* so carry propagation stops here. */ - (a_len == 8 ? multacc512 : maxpy_little)(a_len, &b, a, c); + HP_MPY_ADD_FN(a_len, &b, a, c); } /* c += a * b, where a is y words long. */ @@ -105,7 +112,6 @@ void s_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c) { - (a_len == 8 ? multacc512 : maxpy_little)(a_len, &b, a, c); + HP_MPY_ADD_FN(a_len, &b, a, c); } -