skip blank lines in pagereader.py pprint_ops()
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 30 Sep 2023 13:30:02 +0000 (14:30 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 30 Sep 2023 13:30:02 +0000 (14:30 +0100)
src/openpower/decoder/pseudo/pagereader.py

index 5f30b95440edea848262ad7e229d0c304d254508..e6875769be5e5f216262dd6e5b97d4ff00dd3ac0 100644 (file)
@@ -426,7 +426,8 @@ class ISA:
         for k, v in self.instr.items():
             print("# %s %s" % (v.opcode, v.desc))
             print("Form: %s Regs: %s" % (v.form, v.regs))
-            print('\n'.join(map(lambda x: "    %s" % x, v.pcode)))
+            pcode = filter(lambda x : len(x.strip()), v.pcode) # skip blank
+            print('\n'.join(map(lambda x: "    %s" % x, pcode)))
             print("Specials")
             print('\n'.join(map(lambda x: "    %s" % x, v.sregs)))
             print()