From 69cc27d2ab6caf4072565466940782170e3ee2e8 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Tue, 16 Jan 2024 22:09:45 +0300 Subject: [PATCH] oppc/code: generalize casts --- src/openpower/oppc/pc_code.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openpower/oppc/pc_code.py b/src/openpower/oppc/pc_code.py index 13b6fc65..50a64446 100644 --- a/src/openpower/oppc/pc_code.py +++ b/src/openpower/oppc/pc_code.py @@ -116,7 +116,7 @@ class CodeVisitor(pc_util.Visitor): def fixup_ternary(self, node): self[node].clear() - test = self.call(name="oppc_bool", code=[ + test = self.call(name="oppc_cast_bool", code=[ self[node.test], ]) self[node].emit(stmt="(") @@ -528,7 +528,7 @@ class CodeVisitor(pc_util.Visitor): @pc_util.Hook(pc_ast.IfExpr) def IfExpr(self, node): yield node - test = self.call(name="oppc_bool", code=[ + test = self.call(name="oppc_cast_bool", code=[ self[node.test], ]) self[node].emit(stmt="if (") @@ -547,7 +547,7 @@ class CodeVisitor(pc_util.Visitor): @pc_util.Hook(pc_ast.SwitchExpr) def SwitchExpr(self, node): yield node - subject = self.call(name="oppc_int64", code=[ + subject = self.call(name="oppc_cast_int64", code=[ self[node.subject], ]) self[node].emit(stmt="switch (") -- 2.30.2