Sergei Trofimovich slyfox@gentoo.org writes:
Attaching a proof-of-concept patch nettle-3.3-noclobber.patch which fixes tests on sparc.
Can you try the below patch, which reorders the multiplies, with no change to allocation?
Regards, /Niels
diff --git a/ecc-add-eh.c b/ecc-add-eh.c index a16be4c..c07ff49 100644 --- a/ecc-add-eh.c +++ b/ecc-add-eh.c @@ -98,8 +98,8 @@ ecc_add_eh (const struct ecc_curve *ecc, ecc_modp_mul (ecc, x3, B, z1);
/* y3 */ - ecc_modp_mul (ecc, B, F, C); /* ! */ - ecc_modp_mul (ecc, y3, B, z1); + ecc_modp_mul (ecc, B, F, z1); /* ! */ + ecc_modp_mul (ecc, y3, B, C); /* Clobbers z1 in case r == p. */
/* z3 */ ecc_modp_mul (ecc, B, F, G);