]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[loong64] Replace broken big integer arithmetic implementations
authorMichael Brown <mcb30@ipxe.org>
Fri, 19 Jan 2024 16:35:02 +0000 (16:35 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 19 Jan 2024 16:40:11 +0000 (16:40 +0000)
commit908174ec7e49d845c8b52a07a3db32534eade37d
tree629f597d76156716b292a1b96c30672d999d260c
parentbac13ba1f658a1e742b9ceb958e670086affebe7
[loong64] Replace broken big integer arithmetic implementations

The slightly incomprehensible LoongArch64 implementation for
bigint_subtract() is observed to produce incorrect results for some
input values.

Replace the suspicious LoongArch64 implementations of bigint_add(),
bigint_subtract(), bigint_rol() and bigint_ror(), and add a test case
for a subtraction that was producing an incorrect result with the
previous implementation.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/loong64/include/bits/bigint.h
src/tests/bigint_test.c