[Libre-soc-bugs] [Bug 396] create simulator PowerISA div/mod functions

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Jun 25 17:58:36 BST 2020


--- Comment #3 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
jacob can i ask you if you could check something:

can you write a function that multiplies the result by the divisor
and checks that the result is equal to the dividend in all cases
where overflow is *not* true, and conversely when it is not equal
that the overflow *is* true?

i have a sneaking suspicion that this will be the case, and consequently
the function in the simulator which checks for "overflow" may be a
simple one-liner: "overflow = (divisor * result) != dividend"

as we are not concerned (at all) about speed in the simulator, this will
do the trick.

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

More information about the libre-soc-bugs mailing list