[Libre-soc-dev] SVP64 Vectorised add-carry => big int add

lkcl luke.leighton at gmail.com
Mon Apr 18 16:32:55 BST 2022


On Sun, Apr 17, 2022 at 10:54 AM Jacob Lifshay <programmerjake at gmail.com> wrote:

> turns out, after some checking with 4-bit words, afaict the correct algorithm for mrsubcarry is:
> # for big_c - big_a * word_b
> result <- RC + ~(RA * RB) + CARRY
> result_high <- HIGH_HALF(result)
> if CARRY <= 1 then # unsigned comparison
>     result_high <- result_high + 1
> end
> CARRY <- result_high
> RT <- LOW_HALF(result)

i implemented it here, after finding a suitable c-code implementation
online (hacker's delight, by hannah suarez) and it didn't work
https://git.libre-soc.org/?p=libreriscv.git;a=commitdiff;h=7af4b874b3ef48c35d13c23d0938ee32c5f67972

any clues as to why?

l.



More information about the Libre-soc-dev mailing list