add original instruction as a comment, improving debuggability
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 26 Aug 2022 08:46:41 +0000 (01:46 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 26 Aug 2022 08:46:41 +0000 (01:46 -0700)
src/openpower/sv/trans/svp64.py

index a9fe231be69354311233a3526671ca6de2696079..31d5f0609b91a21b3ccef306730a2b83cc60545b 100644 (file)
@@ -640,9 +640,9 @@ class SVP64Asm:
         custom_insn_hook = CUSTOM_INSNS.get(opcode)
         if custom_insn_hook is not None:
             fields = tuple(map(to_number, fields))
-            insn = custom_insn_hook(fields)
-            log(opcode, bin(insn))
-            yield ".long 0x%x" % insn
+            insn_num = custom_insn_hook(fields)
+            log(opcode, bin(insn_num))
+            yield ".long 0x%X # %s" % (insn_num, insn)
             return
 
         # identify if is a svp64 mnemonic