From: Dmitry Selyutin Date: Sun, 14 Jan 2024 20:29:29 +0000 (+0300) Subject: oppc/code: fix subscript exprs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b49fe28c718207caa48cd5bffae0bb7201108851;p=openpower-isa.git oppc/code: fix subscript exprs --- diff --git a/src/openpower/oppc/pc_code.py b/src/openpower/oppc/pc_code.py index 97810acf..eba51323 100644 --- a/src/openpower/oppc/pc_code.py +++ b/src/openpower/oppc/pc_code.py @@ -439,7 +439,9 @@ class CodeVisitor(pc_util.Visitor): @pc_util.Hook(pc_ast.SubscriptExpr) def SubscriptExpr(self, node): yield node + transient = self.transient() call = self.call(name="oppc_subscript", code=[ + self[transient], self[node.subject], self[node.index], ]) @@ -449,7 +451,9 @@ class CodeVisitor(pc_util.Visitor): @pc_util.Hook(pc_ast.RangeSubscriptExpr) def RangeSubscriptExpr(self, node): yield node - call = self.call(name="oppc_subscript", code=[ + transient = self.transient() + call = self.call(name="oppc_range_subscript", code=[ + self[transient], self[node.subject], self[node.start], self[node.end],