From: Dmitry Selyutin Date: Sun, 14 Jan 2024 18:51:34 +0000 (+0300) Subject: oppc: print C code instead of pseudocode X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c4efeaa2f9a3ef776fcdc7aa61fbbdc42a2c654f;p=openpower-isa.git oppc: print C code instead of pseudocode --- diff --git a/src/openpower/oppc/__main__.py b/src/openpower/oppc/__main__.py index 90e29bc0..d8bcec71 100644 --- a/src/openpower/oppc/__main__.py +++ b/src/openpower/oppc/__main__.py @@ -19,8 +19,8 @@ db = Database(find_wiki_dir()) for insn in db: try: tree = parser.parse(code="\n".join(insn.pcode)) - for (level, line) in pc_pseudocode.pseudocode(tree): - pass + for (level, line) in pc_code.code(name=insn.name, root=tree): + print(f"{' ' * 4 * level}{line}") except Exception as exc: print(insn.name) print(insn.pcode)