diff options
author | lloyd <[email protected]> | 2006-06-06 14:45:05 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-06-06 14:45:05 +0000 |
commit | d3522b3622ac4aad18215bc173f9e26953c6cc3d (patch) | |
tree | 9e5a9e947fc57b83700877a1261b307030ae09ff /src | |
parent | 71ef9df15a45af4d49070336a2dfc0a703a3c21e (diff) |
Remove one parameter from word_madd2 and word_madd3
Diffstat (limited to 'src')
-rw-r--r-- | src/mp_asm.cpp | 8 | ||||
-rw-r--r-- | src/mp_misc.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/mp_asm.cpp b/src/mp_asm.cpp index ec2e31011..ef8292083 100644 --- a/src/mp_asm.cpp +++ b/src/mp_asm.cpp @@ -148,7 +148,7 @@ void bigint_linmul2(word x[], u32bit x_size, word y) carry = word8_linmul2(x + j, y, carry); for(u32bit j = blocks; j != x_size; ++j) - x[j] = word_madd2(x[j], y, carry, &carry); + x[j] = word_madd2(x[j], y, &carry); x[x_size] = carry; } @@ -166,7 +166,7 @@ void bigint_linmul3(word z[], const word x[], u32bit x_size, word y) carry = word8_linmul3(z + j, x + j, y, carry); for(u32bit j = blocks; j != x_size; ++j) - z[j] = word_madd2(x[j], y, carry, &carry); + z[j] = word_madd2(x[j], y, &carry); z[x_size] = carry; } @@ -190,7 +190,7 @@ void bigint_simple_mul(word z[], const word x[], u32bit x_size, carry = word8_madd3(z + j + k, y + k, x_j, carry); for(u32bit k = blocks; k != y_size; ++k) - z[j+k] = word_madd3(x_j, y[k], z[j+k], carry, &carry); + z[j+k] = word_madd3(x_j, y[k], z[j+k], &carry); z[j+y_size] = carry; } @@ -215,7 +215,7 @@ void montgomery_reduce(word z[], u32bit z_size, carry = word8_madd3(z_j + k, x + k, y, carry); for(u32bit k = blocks; k != x_size; ++k) - z_j[k] = word_madd3(x[k], y, z_j[k], carry, &carry); + z_j[k] = word_madd3(x[k], y, z_j[k], &carry); word carry2 = 0; z_j[x_size] = word_add(z_j[x_size], carry, &carry2); diff --git a/src/mp_misc.cpp b/src/mp_misc.cpp index f551948b7..782ad9d15 100644 --- a/src/mp_misc.cpp +++ b/src/mp_misc.cpp @@ -17,8 +17,8 @@ u32bit bigint_divcore(word q, word y1, word y2, word x1, word x2, word x3) { word y0 = 0; - y2 = word_madd2(q, y2, y0, &y0); - y1 = word_madd2(q, y1, y0, &y0); + y2 = word_madd2(q, y2, &y0); + y1 = word_madd2(q, y1, &y0); if(y0 > x1) return 1; if(y0 < x1) return 0; @@ -80,8 +80,8 @@ word bigint_divop(word n1, word n0, word d) word bigint_modop(word n1, word n0, word d) { word z = bigint_divop(n1, n0, d); - word dummy = 0; - z = word_madd2(z, d, dummy, &dummy); + word carry = 0; + z = word_madd2(z, d, &carry); return (n0-z); } |