[Libre-soc-isa] [Bug 817] Big Integer Math (sv.adde, sv.subfe, sv.madded, 128 by 64-bit -> 64-bit div/rem, maybe more...)

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Apr 26 00:50:11 BST 2022


https://bugs.libre-soc.org/show_bug.cgi?id=817

--- Comment #33 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #32)

> yes...knuth's original algorithm is written in mix assembly where the
> operation used is a 2-word by 1-word div/rem where both quotient and
> remainder are 1 word. the only case where that can overflow is where un[j +
> n] == vn[n - 1] in which case it sets qhat to the max value that fits in a
> single word (in the 64-bit case, 2**64-1).

hence the idea of setting to all 1s.

i think... given this is a new type of instruction (dual divmod)
we can get away with that.  elwidth overrides make it useful for
other data widths.

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


More information about the Libre-SOC-ISA mailing list