diff options
author | lloyd <[email protected]> | 2008-10-11 19:42:33 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-10-11 19:42:33 +0000 |
commit | ba35c8fed531797ccbddf41e78a051adb310ee3f (patch) | |
tree | db0d7644005cfd9087357041eb6b9ae116bc9c69 /src/math/bigint | |
parent | b94cb21004e003c603de1a37bef102f61421c641 (diff) |
Disable the implementation of word_add in mp_ia32 for the same reason
as the version in mp_amd64. Presumably they both need the same constraint
added for them to work correclty.
Diffstat (limited to 'src/math/bigint')
-rw-r--r-- | src/math/bigint/mp_ia32/mp_asmi.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/math/bigint/mp_ia32/mp_asmi.h b/src/math/bigint/mp_ia32/mp_asmi.h index 9de0c11e3..20079974e 100644 --- a/src/math/bigint/mp_ia32/mp_asmi.h +++ b/src/math/bigint/mp_ia32/mp_asmi.h @@ -68,12 +68,20 @@ extern "C" { *************************************************/ inline word word_add(word x, word y, word* carry) { +#if 0 asm( ADD_OR_SUBTRACT(ASM("adcl %[y],%[x]")) : [x]"=r"(x), [carry]"=r"(*carry) : "0"(x), [y]"rm"(y), "1"(*carry) : "cc"); return x; +#else + word z = x + y; + word c1 = (z < x); + z += *carry; + *carry = c1 | (z < *carry); + return z; +#endif } /************************************************* |