aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/mp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-03-01 15:43:39 -0500
committerJack Lloyd <[email protected]>2018-03-01 15:43:58 -0500
commit798f62a8ec0b7a6103b518eb439724601a3ba103 (patch)
tree30a122c2f5602e0e349ef473056b13cd00fe5271 /src/lib/math/mp
parent1cb5e213a60c789f47576630224acbecb7e84e92 (diff)
Avoid ternary op during carry handling
Makes it less likely compiler will use add-with-carry op
Diffstat (limited to 'src/lib/math/mp')
-rw-r--r--src/lib/math/mp/mp_asmi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/math/mp/mp_asmi.h b/src/lib/math/mp/mp_asmi.h
index 4a0a2ec03..a69d82a15 100644
--- a/src/lib/math/mp/mp_asmi.h
+++ b/src/lib/math/mp/mp_asmi.h
@@ -745,7 +745,7 @@ inline void word3_muladd(word* w2, word* w1, word* w0, word x, word y)
word carry = *w0;
*w0 = word_madd2(x, y, &carry);
*w1 += carry;
- *w2 += (*w1 < carry) ? 1 : 0;
+ *w2 += (*w1 < carry);
#endif
}