pysvp64asm: avoid empty fields
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 18 Dec 2022 18:36:09 +0000 (21:36 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 2 Jun 2023 18:51:16 +0000 (19:51 +0100)
src/openpower/sv/trans/svp64.py

index 2a17ec3d0bc46a796ada7c33dd1e5600d8920dd8..1e38dc14a76ed4c77b2afa858548f52fdcfb7998 100644 (file)
@@ -254,7 +254,7 @@ class SVP64Asm:
         opcode = ls[0]
         # now find opcode fields
         fields = ''.join(ls[1:]).split(',')
-        mfields = list(map(str.strip, fields))
+        mfields = list(filter(bool, map(str.strip, fields)))
         log("opcode, fields", ls, opcode, mfields)
         fields = []
         # macro substitution