pysvp64asm: avoid empty fields
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 18 Dec 2022 18:36:09 +0000 (21:36 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sun, 15 Jan 2023 19:47:22 +0000 (22:47 +0300)
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