On Tue, 2022-01-04 at 21:28 +0100, Niels Möller wrote:
+define(`FUNC_ALIGN', `5') +PROLOGUE(_nettle_ecc_secp384r1_modp)
+ std H0, -48(SP) + std H1, -40(SP) + std H2, -32(SP) + std H3, -24(SP) + std H4, -16(SP) + std H5, -8(SP)
I find it clearer to use register names rather than the m4 defines for save and restore of callee-save registers.
Here's the modified code which uses the actual registers when saving and restoring from stack.
Amitay.