]> git.ipfire.org Git - thirdparty/openssl.git/commit
armv*-mont.pl: Correct a carry flag comment
authorJessica Clarke <jrtc27@jrtc27.com>
Sat, 14 Jun 2025 21:53:40 +0000 (22:53 +0100)
committerPauli <ppzgs1@gmail.com>
Tue, 17 Jun 2025 22:00:06 +0000 (08:00 +1000)
commit6bb81f9294cbdf8799751745a9d91bfd2cbfaa4f
tree89fc2dd3b2ca21dab57dac018c7d1ecd460162e9
parentfbb2a20732277ebf185ecaadb9e8570f8e9771d7
armv*-mont.pl: Correct a carry flag comment

On Arm, C is a true carry flag, unlike x86 where CF is a borrow flag for
subtraction. That is, for subtraction, it is set if Rn + ~Rm + 1 carries
in unsigned arithmetic, and so for subtracting 0, i.e. adding ~0 + 1, it
always sets the carry flag. Correct the comment to document what this is
actually doing.

CLA: trivial

Fixes: d1671f4f1a39 ("bn/asm/armv4-mont.pl: add NEON code path.")
Fixes: 10646160125a ("Optimize RSA on armv8")
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27826)
crypto/bn/asm/armv4-mont.pl
crypto/bn/asm/armv8-mont.pl