add support for comments in instructions
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 26 Aug 2022 08:46:06 +0000 (01:46 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 26 Aug 2022 08:46:06 +0000 (01:46 -0700)
src/openpower/sv/trans/svp64.py

index bcfa0cc8aa58d96dd54f2a6e163e7b3d206244a0..a9fe231be69354311233a3526671ca6de2696079 100644 (file)
@@ -622,8 +622,9 @@ class SVP64Asm:
         macros.update(self.macros)
         isa = self.isa
         svp64 = self.svp64
+        insn_no_comments = insn.partition('#')[0]
         # find first space, to get opcode
-        ls = insn.split(' ')
+        ls = insn_no_comments.split(' ')
         opcode = ls[0]
         # now find opcode fields
         fields = ''.join(ls[1:]).split(',')