From: Dmitry Selyutin Date: Tue, 16 Jan 2024 19:09:45 +0000 (+0300) Subject: oppc/code: handle call statements X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f15ab48d8f44369d04f8439f32cb07edbddda5df;p=openpower-isa.git oppc/code: handle call statements --- diff --git a/src/openpower/oppc/pc_code.py b/src/openpower/oppc/pc_code.py index 8f1b771e..9b92caef 100644 --- a/src/openpower/oppc/pc_code.py +++ b/src/openpower/oppc/pc_code.py @@ -184,6 +184,10 @@ class CodeVisitor(pc_util.Visitor): yield node with self[node]: for subnode in node: + if isinstance(subnode, pc_ast.Call): + (level, stmt) = self[subnode][-1] + assert stmt[-1] == ")" + self[subnode][-1] = (level, f"{stmt};") for (level, stmt) in self[subnode]: self[node].emit(stmt=stmt, level=level)