aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-03-09 02:53:59 +0000
committerlloyd <[email protected]>2008-03-09 02:53:59 +0000
commit9f63fc79701df7e6b659908f5f8ae7efba7c7720 (patch)
tree79e75981643e1a2aa7e1985820e3b45c47693bb0 /src
parentc6629040068af67dbd9648eb64cc47b1923287cd (diff)
Alter bigint_madd2 and bigint_madd3 to take only 3 (4, resp) arguments,
with the last one being both one of the input values and the output carry register, since almost always they were in fact the same variable. Also update the x86 and x86-64 modules.
Diffstat (limited to 'src')
-rw-r--r--src/mp_asm.cpp4
-rw-r--r--src/mp_misc.cpp6
-rw-r--r--src/mp_mulop.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/mp_asm.cpp b/src/mp_asm.cpp
index 2b921f15d..8065bd186 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;
}
diff --git a/src/mp_misc.cpp b/src/mp_misc.cpp
index 2c6c35d30..24dbb6bfd 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;
@@ -83,7 +83,7 @@ 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);
+ z = word_madd2(z, d, &dummy);
return (n0-z);
}
diff --git a/src/mp_mulop.cpp b/src/mp_mulop.cpp
index 9bbd4cee2..9b6ddca8c 100644
--- a/src/mp_mulop.cpp
+++ b/src/mp_mulop.cpp
@@ -24,7 +24,7 @@ word bigint_mul_add_words(word z[], const word x[], u32bit x_size, word y)
carry = word8_madd3(z + j, x + j, y, carry);
for(u32bit j = blocks; j != x_size; ++j)
- z[j] = word_madd3(x[j], y, z[j], carry, &carry);
+ z[j] = word_madd3(x[j], y, z[j], &carry);
return carry;
}