[Libre-soc-bugs] [Bug 972] addme/subfme carry/overflow likely incorrect

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sat Oct 29 12:15:43 BST 2022


--- Comment #2 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #1)
> imho lots more of our ops likely don't calculate CA correctly because
> SelectableInt doesn't propagate carries

see constructor, "overflow".

detecting CA rather unfortunately has to be done manually. this imposition
is expected based on how the Power ISA specification is written.


yes, it's awful.

the value "-1" is being inserted into the inputs multiple times
(once by handle_carry() and twice by handle_overflow()) which
obviously it should not be, but it doesn't matter because all
code only looks at the first two inputs (sigh).

i suspect different logic is needed for handling add, analysing
the inputs and outputs in a similar fashion to how CA32 is
done.  a first attempt completely broke all other unit tests,
i'm not up to dealing with this.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list