From b49fe28c718207caa48cd5bffae0bb7201108851 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 14 Jan 2024 23:29:29 +0300 Subject: [PATCH] oppc/code: fix subscript exprs --- src/openpower/oppc/pc_code.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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], -- 2.30.2