bug found in pseudocode reader when assembly code has zero args
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 24 Jul 2020 10:14:16 +0000 (11:14 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 24 Jul 2020 10:14:16 +0000 (11:14 +0100)
src/soc/decoder/pseudo/pagereader.py

index 6b25b54b88816e268a0cbba5616141dcb147c7f6..4097e69161fe8832df0b128f0604bb0d8b0dbde3 100644 (file)
@@ -252,7 +252,8 @@ class ISA:
         opcode, regs = o[0], o[1:]
         op = copy(d)
         op['regs'] = regs
-        regs[0] = regs[0].split(",")
+        if len(regs) != 0:
+            regs[0] = regs[0].split(",")
         op['opcode'] = opcode
         self.instr[opcode] = Ops(**op)