summaryrefslogtreecommitdiffstats
path: root/mpi-patches/shrink-mpi-int
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-12-13 09:51:43 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-12-13 09:51:43 -0800
commitd6825dcfed19d2639b304a96d8cec1cabb040783 (patch)
treed9f1df2768409c7c92702f14ebcb2c36921a7dea /mpi-patches/shrink-mpi-int
parent5a9bf359b9aca63f5eb26f5a371b0fae7dd353b4 (diff)
downloadtxr-d6825dcfed19d2639b304a96d8cec1cabb040783.tar.gz
txr-d6825dcfed19d2639b304a96d8cec1cabb040783.tar.bz2
txr-d6825dcfed19d2639b304a96d8cec1cabb040783.zip
Patch to shrink mpi-int to three words on 32 bit platforms,
so that obj_t stays four pointers wide. * mpi-patches/series: New patch added. * mpi-patches/shrink-mpi-int: New file.
Diffstat (limited to 'mpi-patches/shrink-mpi-int')
-rw-r--r--mpi-patches/shrink-mpi-int20
1 files changed, 20 insertions, 0 deletions
diff --git a/mpi-patches/shrink-mpi-int b/mpi-patches/shrink-mpi-int
new file mode 100644
index 00000000..b1b03aa9
--- /dev/null
+++ b/mpi-patches/shrink-mpi-int
@@ -0,0 +1,20 @@
+Index: mpi-1.8.6/mpi.h
+===================================================================
+--- mpi-1.8.6.orig/mpi.h 2011-12-13 09:35:31.000000000 -0800
++++ mpi-1.8.6/mpi.h 2011-12-13 09:40:01.000000000 -0800
+@@ -72,8 +72,13 @@
+ #define MAX_RADIX 64
+
+ typedef struct {
+- mp_sign sign; /* sign of this quantity */
+- mp_size alloc; /* how many digits allocated */
++#if SIZEOF_INT >= SIZEOF_PTR
++ unsigned int sign : 1; /* sign of this quantity */
++ unsigned int alloc : sizeof(int) - 1; /* how many digits allocated */
++#else
++ mp_sign sign;
++ mp_size alloc;
++#endif
+ mp_size used; /* how many digits used */
+ mp_digit *dp; /* the digits themselves */
+ } mp_int;