[Libre-soc-bugs] [Bug 671] convert spec pseudocode to use XLEN width
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Mon Sep 6 04:29:59 BST 2021
https://bugs.libre-soc.org/show_bug.cgi?id=671
--- Comment #62 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to dmitry.selyutin from comment #59)
> I'm not sure whether BCD are appropriate candidates. They all speak of
> _sixes_, which, depending on context, designate either 6 4-bit BCD numbers
> upon input to be converted to four declets (two declets per word), or four
> declets (two declets per word) _together_ are converted to 6 4-bit BCD
> numbers, or, as with addg6s, generate sixes upon addition. I don't feel like
> this logic can be moved to our needs, at least it'll need a significant
> wording update.
In the case of addg6s, it totally can have XLEN overridden, since what it does
is done on individual BCD digits (4-bit units), so elwidth override should work
just fine:
elwidth =
8: corrects for BCD addition of 2 BCD digits (like x86's daa instruction)
16: corrects for BCD addition of 4 BCD digits
32: corrects for BCD addition of 8 BCD digits
64: corrects for BCD addition of 16 BCD digits (unmodified addg6s)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list