bug in longlong.h for aarch64 sub_ddmmss
Torbjörn Granlund
tg at gmplib.org
Wed Jun 17 09:17:27 UTC 2020
Vincent Lefevre <vincent at vinc17.net> writes:
On 2020-06-17 11:04:26 +0200, Niels Möller wrote:
> tg at gmplib.org (Torbjörn Granlund) writes:
>
> > The two - signs ought to be ~, I think. Let me think a buit more about that.
>
> If I remember ARM conventions correctly, subtract with carry is defined
> as
>
> {cout, r} = a + ~b + cin
This is a - b - borrow, where the borrow is the complement of the
carry bit.
Niels' definition is important as it captures the similarity with
addition. It is indeed how the instructions are described in the vendor
manuals.
--
Torbjörn
Please encrypt, key id 0xC8601622
More information about the gmp-bugs
mailing list