power_insn: filter out empty pcode lines
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 14 May 2023 20:25:34 +0000 (20:25 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 2 Jun 2023 18:51:18 +0000 (19:51 +0100)
src/openpower/decoder/power_insn.py

index 7d779ca8d00616e9c6188b0876752b035e429200..f7e3229bfcf296c774534586fb01d14816df31da 100644 (file)
@@ -3480,7 +3480,7 @@ class MarkdownDatabase:
                 (dynamic, *static) = desc.regs
                 operands.extend(dynamic)
                 operands.extend(static)
-            pcode = PCode(iterable=desc.pcode)
+            pcode = PCode(iterable=filter(str.strip, desc.pcode))
             operands = Operands(insn=name, operands=operands)
             db[name] = MarkdownRecord(pcode=pcode, operands=operands)