From c4efeaa2f9a3ef776fcdc7aa61fbbdc42a2c654f Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 14 Jan 2024 21:51:34 +0300 Subject: [PATCH] oppc: print C code instead of pseudocode --- src/openpower/oppc/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.30.2