From 3490dd06c52d5aa7c258f03025a05064837ce1c6 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 4 Mar 2012 11:55:19 -0800 Subject: * mpi-patches/add-mp-hash (mp_hash): Fixed use of uninitialized variable on platforms where the MP digit is smaller than a long integer. (Not anything TXR is known to run on). Changed algorithm to take the first and last digit and add them together, rather than just taking the last digit. The last digit will be zeros for numbers that contain 2 as a factor with a large enough multiplicity. * mpi-patches/add-mpi-toradix-with-case: Refreshed. * mpi-patches/bit-search-optimizations: Likewise. * mpi-patches/faster-square-root: Likewise. * mpi-patches/fix-bad-shifts: Likewise. * mpi-patches/fix-mult-bug: Likewise. --- mpi-patches/bit-search-optimizations | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mpi-patches/bit-search-optimizations') diff --git a/mpi-patches/bit-search-optimizations b/mpi-patches/bit-search-optimizations index ccbdae79..3dfaaa52 100644 --- a/mpi-patches/bit-search-optimizations +++ b/mpi-patches/bit-search-optimizations @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2011-12-21 15:57:17.000000000 -0800 -+++ mpi-1.8.6/mpi.c 2011-12-21 15:57:49.000000000 -0800 -@@ -2908,6 +2908,218 @@ +--- mpi-1.8.6.orig/mpi.c 2012-03-04 11:49:59.676143507 -0800 ++++ mpi-1.8.6/mpi.c 2012-03-04 11:50:07.500542257 -0800 +@@ -2921,6 +2921,218 @@ /* }}} */ @@ -221,7 +221,7 @@ Index: mpi-1.8.6/mpi.c /* {{{ s_mp_exch(a, b) */ /* Exchange the data for a and b; (b, a) = (a, b) */ -@@ -3185,10 +3397,9 @@ +@@ -3198,10 +3410,9 @@ mp_digit t, d = 0; t = DIGIT(b, USED(b) - 1); @@ -235,7 +235,7 @@ Index: mpi-1.8.6/mpi.c if(d != 0) { s_mp_mul_2d(a, d); -@@ -3971,27 +4182,23 @@ +@@ -3984,27 +4195,23 @@ d = DIGIT(v, uv - 1); /* most significant digit of v */ @@ -275,7 +275,7 @@ Index: mpi-1.8.6/mpi.c } /* end s_mp_ispow2() */ /* }}} */ -@@ -4000,17 +4207,12 @@ +@@ -4013,17 +4220,12 @@ int s_mp_ispow2d(mp_digit d) { -- cgit v1.2.3