Merge remote-tracking branch 'origin/pr/2359' into mbedtls-2.7
diff --git a/ChangeLog b/ChangeLog
index 3cce6d8..318860a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,11 @@
Inserted as an enhancement for #1371
* Add support for alternative CSR headers, as used by Microsoft and defined
in RFC 7468. Found by Michael Ernst. Fixes #767.
+ * Fix clobber list in MIPS assembly for large integer multiplication.
+ Previously, this could lead to functionally incorrect assembly being
+ produced by some optimizing compilers, showing up as failures in
+ e.g. RSA or ECC signature operations. Reported in #1722, fix suggested
+ by Aurelien Jarno and submitted by Jeffrey Martin.
= mbed TLS 2.7.9 branch released 2018-12-21
diff --git a/include/mbedtls/bn_mul.h b/include/mbedtls/bn_mul.h
index dbdc0a3..3a254aa 100644
--- a/include/mbedtls/bn_mul.h
+++ b/include/mbedtls/bn_mul.h
@@ -740,7 +740,7 @@
"sw $10, %2 \n\t" \
: "=m" (c), "=m" (d), "=m" (s) \
: "m" (s), "m" (d), "m" (c), "m" (b) \
- : "$9", "$10", "$11", "$12", "$13", "$14", "$15" \
+ : "$9", "$10", "$11", "$12", "$13", "$14", "$15", "lo", "hi" \
);
#endif /* MIPS */