bn: save/restore registers to/from stack
authorMartin Schwenke <martin@meltin.net>
Wed, 16 Jun 2021 06:54:26 +0000 (16:54 +1000)
committerPauli <pauli@openssl.org>
Tue, 22 Jun 2021 08:30:17 +0000 (18:30 +1000)
commit3f55ff6af5dde97c6cda53bd735606f21b5707a5
treeae0dabafd82aa43a75df0a2b48ef58b3c473af72
parent5b7f986457d2ae181de9475a3d303e6ba4a3b16c
bn: save/restore registers to/from stack

mtvsrd/mfvsrd are ISA >= 2.07 only, so this won't work for older
CPUs.

It would be possible to use this scheme only in the ISA >= 3.0
implementation.  However, in the future it may be possible for newer
ISAs to allow CPU implementations without a vector unit, so don't
bother.  The performance improvement versus using the stack was small
anyway.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15798)
crypto/bn/asm/ppc64-mont-fixed.pl