From: Dmitry Selyutin Date: Sun, 13 Nov 2022 21:07:01 +0000 (+0300) Subject: pysvp64asm: allow insndb-based assembly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4bf432f370522572f94cbd04e0da772c5438cfc0;p=openpower-isa.git pysvp64asm: allow insndb-based assembly --- diff --git a/src/openpower/sv/trans/svp64.py b/src/openpower/sv/trans/svp64.py index d93d988f..2a17ec3d 100644 --- a/src/openpower/sv/trans/svp64.py +++ b/src/openpower/sv/trans/svp64.py @@ -293,6 +293,25 @@ class SVP64Asm: else: v30b_op = v30b_op_orig + record = None + if os.environ.get("INSNDB"): + record = DB[v30b_op] + if record is not None: + insn = SVP64Instruction.assemble(db=DB, + opcode=v30b_op_orig, + arguments=fields, + specifiers=opmodes) + prefix = int(insn.prefix) + suffix = int(insn.suffix) + yield " ".join(( + f".long 0x{prefix:08X};", + f".long 0x{suffix:08X};", + "#", + opcode, + ",".join(fields), + )) + return + # look up the 32-bit op (original, with "." if it has it) if v30b_op_orig in isa.instr: isa_instr = isa.instr[v30b_op_orig]