152 Commits

Author SHA1 Message Date
nelsonb%netscape.com
4b4200d9a2 Add targets for HPUX Itanium family processors.
git-svn-id: svn://10.0.0.236/trunk@130560 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-27 01:23:28 +00:00
wtc%netscape.com
14d50e4b47 Bug 170379: fix the stack overflow crash by not allocating the 32K "sieve"
array on the stack.


git-svn-id: svn://10.0.0.236/trunk@130468 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-26 00:04:25 +00:00
jpierre%netscape.com
8b0a3479fe Roll back checkin to fix QA tests
git-svn-id: svn://10.0.0.236/trunk@129031 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-07 02:59:04 +00:00
jpierre%netscape.com
c58e9e8e95 Fix compiler warnings
git-svn-id: svn://10.0.0.236/trunk@129022 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-07 01:24:27 +00:00
jpierre%netscape.com
87079cb57c Fix compiler warnings
git-svn-id: svn://10.0.0.236/trunk@129018 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-07 01:00:04 +00:00
nelsonb%netscape.com
a7e8ec2f2c Get freebl and mpi to build for WinCE. Use NSPR for I/O in sysrand.
git-svn-id: svn://10.0.0.236/trunk@118063 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-04 00:19:43 +00:00
sonja.mirtitsch%sun.com
7b61b41c04 removed compiler workshop 5 marker bug# 124256 r=nelsonb
git-svn-id: svn://10.0.0.236/trunk@113953 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-08 00:43:18 +00:00
nelsonb%netscape.com
75593bc5fe Don't allocate sieve from stack on machines with very-limited stacks.
Bug 115012.  Patch from Michael Kaply mkaply@us.ibm.com


git-svn-id: svn://10.0.0.236/trunk@110732 18797224-902f-48f8-a5cc-f745e15eee43
2001-12-18 21:49:49 +00:00
jpierre%netscape.com
dd770d60a7 Fix NT comment in OS/2 Makefile
git-svn-id: svn://10.0.0.236/trunk@105642 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-17 22:15:26 +00:00
jpierre%netscape.com
224f9b47dc Fix for 104740 - build bignum library on OS/2 with mpi_x86 assembly code . reviewed by nelsonb
git-svn-id: svn://10.0.0.236/trunk@105640 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-17 20:35:37 +00:00
nelsonb%netscape.com
cbcf5e174c Fix bug 105185, which sometimes caused the result to be greater than n.
Fix suggested by Ferenc Rakoczi <Ferenc.Rakoczi@Sun.COM>


git-svn-id: svn://10.0.0.236/trunk@105639 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-17 20:35:04 +00:00
nelsonb%netscape.com
09d10cfe84 Build mpi with new file mpvalpha.c.
Contributed by Richard C. Swift (swift@netscape.com)


git-svn-id: svn://10.0.0.236/trunk@104967 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 23:51:36 +00:00
nelsonb%netscape.com
4f7573176d The Original Code is Multiple Precision Integer optimization code for
the Compaq Alpha processor.
The Initial Developer of the Original Code is Richard C. Swift.
Portions created by the Initial Developer are Copyright (C) 2001
the Initial Developer. All Rights Reserved.


git-svn-id: svn://10.0.0.236/trunk@104966 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 23:47:59 +00:00
relyea%netscape.com
6f50db662d Replace variable that belongs in an ifdef.
git-svn-id: svn://10.0.0.236/trunk@103376 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 23:15:12 +00:00
relyea%netscape.com
0ffcdcfc2e Fix compiler warnings on AIX, Linux, HP, and Solaris.
git-svn-id: svn://10.0.0.236/trunk@103369 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 22:14:09 +00:00
javi%netscape.com
365d02b3d2 Fix for bug 87865 r=nelsonb,mcgreer
Use the constant SIEVE_SIZE instead of the sizeof operator since
  the type for the variable sieve is different on the Mac.


git-svn-id: svn://10.0.0.236/trunk@98100 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-28 00:05:55 +00:00
wtc%netscape.com
d65e93bba6 Bugzilla bug #86125: removed the support for MP_DIGIT_MAX < 256. This
#if preprocessor directive broke some C preprocessors that don't recognize
LL constants even though the C compilers support long long.  r=nelsonb.


git-svn-id: svn://10.0.0.236/trunk@97332 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-18 19:54:21 +00:00
wtc%netscape.com
3a79598629 Bugzilla bug #82837: backed out the workaround as we are not affected by
this compiler bug with Nelson's fix in bug #73115.


git-svn-id: svn://10.0.0.236/trunk@96086 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-31 00:12:18 +00:00
wtc%netscape.com
85105813a3 Bugzilla bug #82837: work around a Forte6 compiler optimization bug on
Solaris x86.


git-svn-id: svn://10.0.0.236/trunk@96061 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-30 18:15:30 +00:00
nelsonb%netscape.com
ff291929e9 A version of the Intel assembler code for Solaris i86pc's as assembler.
git-svn-id: svn://10.0.0.236/trunk@93291 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-27 20:47:39 +00:00
relyea%netscape.com
acc35e34b4 bug 70992 patches to build 4.2 BSD
git-svn-id: svn://10.0.0.236/trunk@89517 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-13 19:02:05 +00:00
nelsonb%netscape.com
5bc2557a28 Fix memory leak in mpp_make_prime. Bug 67094.
git-svn-id: svn://10.0.0.236/trunk@85788 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-31 00:37:40 +00:00
nelsonb%netscape.com
86e42542d2 When searching for a prime, the number of Miller-Rabin tests to be
performed will be done in accordance with a table published in the
Handbook of Applied Cryptography.  See Bug 65151.  Also, changes to
test program for this function.


git-svn-id: svn://10.0.0.236/trunk@85061 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-18 01:39:17 +00:00
nelsonb%netscape.com
58e49539c3 Save and restore %ebx register in all functions. Fixes bug 64940.
git-svn-id: svn://10.0.0.236/trunk@84835 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-12 01:37:02 +00:00
nelsonb%netscape.com
d3fb18f4ea Changed HP assembler routine multacc512 in hpma512.s so that it
propagates carries exactly the same way that maxpy_little does.
Re-enabled use of multacc512 in mpi_hp.c.


git-svn-id: svn://10.0.0.236/trunk@84558 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-08 05:58:34 +00:00
nelsonb%netscape.com
257b169fe6 Generation of prime numbers has been failing on HP since MPI began to
use the newest HP assembler function, multacc512.  So, that function
has been disabled.  Further investigation is needed.


git-svn-id: svn://10.0.0.236/trunk@84540 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-08 01:01:35 +00:00
nelsonb%netscape.com
eca7bfde58 This file has been superseded by mpv_sparcv8.s and mpv_sparcv9.s
git-svn-id: svn://10.0.0.236/trunk@84161 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-29 01:07:00 +00:00
nelsonb%netscape.com
c66b8b74e0 Implement new mpi function mpi_read_variable_radix(). It's like
mpi_read_radix(), except that if the input stream begins with a leading
zero or "0x", it will interpret the input as octal or hex, respectively.


git-svn-id: svn://10.0.0.236/trunk@84159 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-29 01:01:37 +00:00
nelsonb%netscape.com
24d2f7c2f8 Optimized version of these functions, contributed by Sun.
git-svn-id: svn://10.0.0.236/trunk@84157 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-29 00:36:31 +00:00
nelsonb%netscape.com
71517dff8a Separate the floating point and integer implementations of modular
exponentiation into two functions that can be chosen at run time.


git-svn-id: svn://10.0.0.236/trunk@84131 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-28 03:41:50 +00:00
nelsonb%netscape.com
e9d4a7ee0b Attempt to clarify code to reduce confusion about side effect of
MP_CHECKOK macro.


git-svn-id: svn://10.0.0.236/trunk@84085 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-27 03:14:28 +00:00
nelsonb%netscape.com
0abec21283 Change HP 64-bit and hybrid builds to use new HP assembly code.
Fix uses of $(LIB).


git-svn-id: svn://10.0.0.236/trunk@84082 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-27 02:08:54 +00:00
nelsonb%netscape.com
13f683315a The Initial Developer of the Original Code is Netscape
Communications Corporation.  Portions created by Netscape are
Copyright (C) 2000 Netscape Communications Corporation.  All Rights
Reserved.


git-svn-id: svn://10.0.0.236/trunk@84081 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-27 01:48:25 +00:00
nelsonb%netscape.com
c41d481f87 The Initial Developer of the Original Code is the Hewlett-Packard Company.
Portions created by Hewlett-Packard Company are
Copyright (C) 1999 Hewlett-Packard Company.  All Rights Reserved.


git-svn-id: svn://10.0.0.236/trunk@84080 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-27 01:45:23 +00:00
nelsonb%netscape.com
d52d28c7cb The Initial Developer of the Original Code is the Hewlett-Packard Company.
Portions created by Hewlett-Packard Company are
Copyright (C) 1997 Hewlett-Packard Company.  All Rights Reserved.


git-svn-id: svn://10.0.0.236/trunk@84079 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-27 01:44:44 +00:00
nelsonb%netscape.com
48075c60b5 Revise mp_div and s_mp_div substantially. Reduce the number of temporary
variables.  Eliminate inner loop of shifts from s_mp_div.


git-svn-id: svn://10.0.0.236/trunk@83890 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-20 05:54:18 +00:00
nelsonb%netscape.com
09886b7824 Implement new feature test macros for controlling the use of mp_word over
individual types of operations, e.g., multiply, divide, add, subtract.
Use a specific combination of these for 32-bit on AIX.


git-svn-id: svn://10.0.0.236/trunk@83707 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-15 05:38:09 +00:00
nelsonb%netscape.com
d53f834287 Add missing Makefile lines to build mpi optimally for AIX 32 and 64-bit.
git-svn-id: svn://10.0.0.236/trunk@83705 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-15 03:01:23 +00:00
nelsonb%netscape.com
495e4f4fe9 Fix mpi-test for machines that have long or long long digits.
git-svn-id: svn://10.0.0.236/trunk@83704 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-15 03:00:00 +00:00
nelsonb%netscape.com
9aedc41fdb Add support for unsigned long long mp_digits.
Revise and simplify the scheme of feature test macros used in mpi.h.
Remove all NSS_ and SOLARIS ifdefs from the source.


git-svn-id: svn://10.0.0.236/trunk@83580 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-13 01:22:22 +00:00
nelsonb%netscape.com
4dcb966df9 This file is the output of Sun's WorkShop 5.0 compiler for mpv_sparc.c,
when compiled for the v8+ or v9 architecture.  This file may be built
with WorkShop 4.2 and will produce the same .o as WorkShop 5.0.


git-svn-id: svn://10.0.0.236/trunk@83578 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-13 01:19:55 +00:00
nelsonb%netscape.com
afa885868c On DEC Alpha/OSF1, following the examples in <c_asm.h>, use inline
assembly code to get 64-bit products and squares from 32-bit multipliers
in just two instructions.  Speeds up multiplication and squaring a lot.


git-svn-id: svn://10.0.0.236/trunk@83433 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-09 03:36:41 +00:00
nelsonb%netscape.com
1367cfcdaf When building without the inline assembly macros, use a simple cast
rather than the math lib's floor() function.  Also, don't and with a
mask of all 1 bits when casting to a smaller unsigned type will suffice.


git-svn-id: svn://10.0.0.236/trunk@83432 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-09 03:32:41 +00:00
nelsonb%netscape.com
d65fb44585 This modification, contributed by Sun, avoids computing values >= 2^52.
This code runs much faster than the previous version on UltraSparc-3 CPUs,
and slightly slower than the previous version on UltraSparc-II CPUs.


git-svn-id: svn://10.0.0.236/trunk@83388 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-08 00:20:36 +00:00
nelsonb%netscape.com
4d2d37c131 Use the new floating point Montgomery multiply code from Sun on Solaris.
git-svn-id: svn://10.0.0.236/trunk@83205 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-02 02:37:22 +00:00
nelsonb%netscape.com
69b5cdadbd Back out a previous change to one line of this code for performance.
git-svn-id: svn://10.0.0.236/trunk@83178 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-01 03:58:17 +00:00
nelsonb%netscape.com
c13f8e7057 Add new optional third argument which specifies modulus size in bytes.
Don't print values for powers 0, 1, and 2 unless the repetition count
(the optional second argument) is 1.


git-svn-id: svn://10.0.0.236/trunk@83177 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-01 03:56:12 +00:00
nelsonb%netscape.com
bb03e50b31 Replace compiler-generated inner loop code with optimized code.
This optimized code was contributed by Sun Microsystems Inc.


git-svn-id: svn://10.0.0.236/trunk@83176 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-01 03:53:13 +00:00
nelsonb%netscape.com
57f86c8e45 * The Original Code is SPARC hand-optimized Montgomery multiply functions.
*
* The Initial Developer of the Original Code is Sun Microsystems Inc.
* Portions created by Sun Microsystems Inc. are
* Copyright (C) 1999-2000 Sun Microsystems Inc. All Rights Reserved.


git-svn-id: svn://10.0.0.236/trunk@83175 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-01 03:18:27 +00:00
nelsonb%netscape.com
93bbef4ef2 * inline macros for SPARC Montgomery multiply functions.
*
* The Initial Developer of the Original Code is Sun Microsystems Inc.
* Portions created by Sun Microsystems Inc. are
* Copyright (C) 1999-2000 Sun Microsystems Inc. All Rights Reserved.


git-svn-id: svn://10.0.0.236/trunk@83174 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-01 03:17:53 +00:00