[Libre-soc-bugs] [Bug 671] convert spec pseudocode to use XLEN width

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Sep 7 02:30:07 BST 2021


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

--- Comment #71 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Jacob Lifshay from comment #63)
> adding an 8-bit BCD number on SVP64 does:
> # inputs in r3 and r4
> sv.add/elwidth=8 r5.s, r3.s, r4.s
> sv.addg6s/elwidth=8 r3.s, r3.s, r4.s
> sv.add/elwidth=8 r3.s, r3.s, r5.s
> # output in r3

turns out I have the wrong assembly code for OpenPower, the correct code can be
derived from the programming note on page 103 (134) of OpenPower ISA v2.07B:
# inputs in r3 and r4
sv.addi/elwidth=8 r3.s, r3.s, 0x66
sv.add/elwidth=8 r5.s, r3.s, r4.s
sv.addg6s/elwidth=8 r3.s, r3.s, r4.s
sv.subf/elwidth=8 r3.s, r3.s, r5.s
# output in r3

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


More information about the libre-soc-bugs mailing list