From 7cfd0ccafce91000ffc6d2d49b9ad6c54d18a768 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 4 Apr 2020 13:54:40 +0100 Subject: [PATCH] whoops prefix op_ already added --- src/soc/decoder/pseudo/pywriter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soc/decoder/pseudo/pywriter.py b/src/soc/decoder/pseudo/pywriter.py index 5ab685d3..88746e28 100644 --- a/src/soc/decoder/pseudo/pywriter.py +++ b/src/soc/decoder/pseudo/pywriter.py @@ -54,7 +54,7 @@ class PyISAWriter(ISA): # write out function. pre-pend "op_" because some instrs are # also python keywords (cmp). also replace "." with "_" op_fname ="op_%s" % page.replace(".", "_") - f.write(" def op_%s(%s):\n" % (op_fname, args)) + f.write(" def %s(%s):\n" % (op_fname, args)) pycode = pycode.split("\n") pycode = '\n'.join(map(lambda x: " %s" % x, pycode)) pycode = pycode.rstrip() @@ -64,7 +64,7 @@ class PyISAWriter(ISA): else: f.write("\n") # accumulate the instruction info - iinfo = "(op_%s, %s, %s, %s)" % \ + iinfo = "(%s, %s, %s, %s)" % \ (op_fname, rused['read_regs'], rused['uninit_regs'], rused['write_regs']) iinf += " instrs['%s'] = %s\n" % (page, iinfo) -- 2.30.2