diff options
author | lloyd <[email protected]> | 2008-03-09 02:53:59 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-03-09 02:53:59 +0000 |
commit | 9f63fc79701df7e6b659908f5f8ae7efba7c7720 (patch) | |
tree | 79e75981643e1a2aa7e1985820e3b45c47693bb0 /include/mp_asm.h | |
parent | c6629040068af67dbd9648eb64cc47b1923287cd (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 'include/mp_asm.h')
-rw-r--r-- | include/mp_asm.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/mp_asm.h b/include/mp_asm.h index 88229b386..64694492a 100644 --- a/include/mp_asm.h +++ b/include/mp_asm.h @@ -27,20 +27,20 @@ extern "C" { /************************************************* * Word Multiply/Add * *************************************************/ -inline word word_madd2(word a, word b, word c, word* carry) +inline word word_madd2(word a, word b, word* c) { - dword z = (dword)a * b + c; - *carry = (word)(z >> BOTAN_MP_WORD_BITS); + dword z = (dword)a * b + *c; + *c = (word)(z >> BOTAN_MP_WORD_BITS); return (word)z; } /************************************************* * Word Multiply/Add * *************************************************/ -inline word word_madd3(word a, word b, word c, word d, word* carry) +inline word word_madd3(word a, word b, word c, word* d) { - dword z = (dword)a * b + c + d; - *carry = (word)(z >> BOTAN_MP_WORD_BITS); + dword z = (dword)a * b + c + *d; + *d = (word)(z >> BOTAN_MP_WORD_BITS); return (word)z; } |