Merge branch 'register' into develop This closes #42
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
diff --git a/bn_fast_mp_montgomery_reduce.c b/bn_fast_mp_montgomery_reduce.c
index d2d55a8..a63839d 100644
--- a/bn_fast_mp_montgomery_reduce.c
+++ b/bn_fast_mp_montgomery_reduce.c
@@ -42,8 +42,8 @@ int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
* an array of double precision words W[...]
*/
{
- register mp_word *_W;
- register mp_digit *tmpx;
+ mp_word *_W;
+ mp_digit *tmpx;
/* alias for the W[] array */
_W = W;
@@ -72,7 +72,7 @@ int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
* by casting the value down to a mp_digit. Note this requires
* that W[ix-1] have the carry cleared (see after the inner loop)
*/
- register mp_digit mu;
+ mp_digit mu;
mu = (mp_digit) (((W[ix] & MP_MASK) * rho) & MP_MASK);
/* a = a + mu * m * b**i
@@ -90,9 +90,9 @@ int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
* first m->used words of W[] have the carries fixed
*/
{
- register int iy;
- register mp_digit *tmpn;
- register mp_word *_W;
+ int iy;
+ mp_digit *tmpn;
+ mp_word *_W;
/* alias for the digits of the modulus */
tmpn = n->dp;
@@ -115,8 +115,8 @@ int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
* significant digits we zeroed].
*/
{
- register mp_digit *tmpx;
- register mp_word *_W, *_W1;
+ mp_digit *tmpx;
+ mp_word *_W, *_W1;
/* nox fix rest of carries */
diff --git a/bn_fast_s_mp_mul_digs.c b/bn_fast_s_mp_mul_digs.c
index aaad804..acd13b4 100644
--- a/bn_fast_s_mp_mul_digs.c
+++ b/bn_fast_s_mp_mul_digs.c
@@ -35,7 +35,7 @@ int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
{
int olduse, res, pa, ix, iz;
mp_digit W[MP_WARRAY];
- register mp_word _W;
+ mp_word _W;
/* grow the destination as required */
if (c->alloc < digs) {
@@ -85,7 +85,7 @@ int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
c->used = pa;
{
- register mp_digit *tmpc;
+ mp_digit *tmpc;
tmpc = c->dp;
for (ix = 0; ix < (pa + 1); ix++) {
/* now extract the previous digit [below the carry] */
diff --git a/bn_fast_s_mp_mul_high_digs.c b/bn_fast_s_mp_mul_high_digs.c
index 6c22b13..b96cf60 100644
--- a/bn_fast_s_mp_mul_high_digs.c
+++ b/bn_fast_s_mp_mul_high_digs.c
@@ -75,7 +75,7 @@ int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
c->used = pa;
{
- register mp_digit *tmpc;
+ mp_digit *tmpc;
tmpc = c->dp + digs;
for (ix = digs; ix < pa; ix++) {
diff --git a/bn_mp_copy.c b/bn_mp_copy.c
index dc853b3..69e9464 100644
--- a/bn_mp_copy.c
+++ b/bn_mp_copy.c
@@ -35,7 +35,7 @@ mp_copy (mp_int * a, mp_int * b)
/* zero b and copy the parameters over */
{
- register mp_digit *tmpa, *tmpb;
+ mp_digit *tmpa, *tmpb;
/* pointer aliases */
diff --git a/bn_mp_div_2.c b/bn_mp_div_2.c
index 7df0457..d2a213f 100644
--- a/bn_mp_div_2.c
+++ b/bn_mp_div_2.c
@@ -30,7 +30,7 @@ int mp_div_2(mp_int * a, mp_int * b)
oldused = b->used;
b->used = a->used;
{
- register mp_digit r, rr, *tmpa, *tmpb;
+ mp_digit r, rr, *tmpa, *tmpb;
/* source alias */
tmpa = a->dp + b->used - 1;
diff --git a/bn_mp_div_2d.c b/bn_mp_div_2d.c
index d809447..5b9fb48 100644
--- a/bn_mp_div_2d.c
+++ b/bn_mp_div_2d.c
@@ -58,7 +58,7 @@ int mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d)
/* shift any bit count < DIGIT_BIT */
D = (mp_digit) (b % DIGIT_BIT);
if (D != 0) {
- register mp_digit *tmpc, mask, shift;
+ mp_digit *tmpc, mask, shift;
/* mask */
mask = (((mp_digit)1) << D) - 1;
diff --git a/bn_mp_karatsuba_mul.c b/bn_mp_karatsuba_mul.c
index 09ee401..d65e37e 100644
--- a/bn_mp_karatsuba_mul.c
+++ b/bn_mp_karatsuba_mul.c
@@ -82,8 +82,8 @@ int mp_karatsuba_mul (mp_int * a, mp_int * b, mp_int * c)
y1.used = b->used - B;
{
- register int x;
- register mp_digit *tmpa, *tmpb, *tmpx, *tmpy;
+ int x;
+ mp_digit *tmpa, *tmpb, *tmpx, *tmpy;
/* we copy the digits directly instead of using higher level functions
* since we also need to shift the digits
diff --git a/bn_mp_karatsuba_sqr.c b/bn_mp_karatsuba_sqr.c
index 1d9f883..739840d 100644
--- a/bn_mp_karatsuba_sqr.c
+++ b/bn_mp_karatsuba_sqr.c
@@ -52,8 +52,8 @@ int mp_karatsuba_sqr (mp_int * a, mp_int * b)
goto X0X0;
{
- register int x;
- register mp_digit *dst, *src;
+ int x;
+ mp_digit *dst, *src;
src = a->dp;
diff --git a/bn_mp_lshd.c b/bn_mp_lshd.c
index 0e0ea0a..f6f800f 100644
--- a/bn_mp_lshd.c
+++ b/bn_mp_lshd.c
@@ -33,7 +33,7 @@ int mp_lshd (mp_int * a, int b)
}
{
- register mp_digit *top, *bottom;
+ mp_digit *top, *bottom;
/* increment the used by the shift amount then copy upwards */
a->used += b;
diff --git a/bn_mp_montgomery_reduce.c b/bn_mp_montgomery_reduce.c
index d2a65c2..af2cc58 100644
--- a/bn_mp_montgomery_reduce.c
+++ b/bn_mp_montgomery_reduce.c
@@ -56,9 +56,9 @@ mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
/* a = a + mu * m * b**i */
{
- register int iy;
- register mp_digit *tmpn, *tmpx, u;
- register mp_word r;
+ int iy;
+ mp_digit *tmpn, *tmpx, u;
+ mp_word r;
/* alias for digits of the modulus */
tmpn = n->dp;
diff --git a/bn_mp_mul_2.c b/bn_mp_mul_2.c
index 0859c64..9c72c7f 100644
--- a/bn_mp_mul_2.c
+++ b/bn_mp_mul_2.c
@@ -31,7 +31,7 @@ int mp_mul_2(mp_int * a, mp_int * b)
b->used = a->used;
{
- register mp_digit r, rr, *tmpa, *tmpb;
+ mp_digit r, rr, *tmpa, *tmpb;
/* alias for source */
tmpa = a->dp;
diff --git a/bn_mp_mul_2d.c b/bn_mp_mul_2d.c
index 9506814..9967e46 100644
--- a/bn_mp_mul_2d.c
+++ b/bn_mp_mul_2d.c
@@ -44,8 +44,8 @@ int mp_mul_2d (mp_int * a, int b, mp_int * c)
/* shift any bit count < DIGIT_BIT */
d = (mp_digit) (b % DIGIT_BIT);
if (d != 0) {
- register mp_digit *tmpc, shift, mask, r, rr;
- register int x;
+ mp_digit *tmpc, shift, mask, r, rr;
+ int x;
/* bitmask for carries */
mask = (((mp_digit)1) << d) - 1;
diff --git a/bn_mp_rshd.c b/bn_mp_rshd.c
index 8ed6933..77b0f6c 100644
--- a/bn_mp_rshd.c
+++ b/bn_mp_rshd.c
@@ -32,7 +32,7 @@ void mp_rshd (mp_int * a, int b)
}
{
- register mp_digit *bottom, *top;
+ mp_digit *bottom, *top;
/* shift the digits down */
diff --git a/bn_s_mp_add.c b/bn_s_mp_add.c
index 47fdaf1..c2ad649 100644
--- a/bn_s_mp_add.c
+++ b/bn_s_mp_add.c
@@ -47,8 +47,8 @@ s_mp_add (mp_int * a, mp_int * b, mp_int * c)
c->used = max + 1;
{
- register mp_digit u, *tmpa, *tmpb, *tmpc;
- register int i;
+ mp_digit u, *tmpa, *tmpb, *tmpc;
+ int i;
/* alias for digit pointers */
diff --git a/bn_s_mp_sub.c b/bn_s_mp_sub.c
index 55260fe..c0ea556 100644
--- a/bn_s_mp_sub.c
+++ b/bn_s_mp_sub.c
@@ -35,8 +35,8 @@ s_mp_sub (mp_int * a, mp_int * b, mp_int * c)
c->used = max;
{
- register mp_digit u, *tmpa, *tmpb, *tmpc;
- register int i;
+ mp_digit u, *tmpa, *tmpb, *tmpc;
+ int i;
/* alias for digit pointers */
tmpa = a->dp;