[Libre-soc-bugs] [Bug 656] add v3.0B BCD instructions to simulator

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Jul 30 21:03:22 BST 2021


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

--- Comment #11 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
diff --git a/openpower/isa/bcd.mdwn b/openpower/isa/bcd.mdwn
index 30bb161..04753ed 100644
--- a/openpower/isa/bcd.mdwn
+++ b/openpower/isa/bcd.mdwn
@@ -33,13 +33,15 @@ XO-Form

 Pseudo-code:

+    dc[16] = [0]*16
     do i = 0 to 15

this is a comparison rather than an assignment (can't count the number
of times i've made that error), and it should be dc <- [0]*16.

"dc[16] <- [0]*16" will be trying to assign a 16-bit value into an
implicit 17th bit of dc, which is only 1 bit wide

SelectableInt is quite specific about bit-width matching its inputs
and outputs, so would throw a runtime exception.

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


More information about the libre-soc-bugs mailing list