From df3f6e7e9788664da43bf81e86f489e8914f2a4a Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 14 Jan 2024 16:43:00 +0300 Subject: [PATCH] oppc/code: support unsigned comparisons --- src/openpower/oppc/pc_code.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openpower/oppc/pc_code.py b/src/openpower/oppc/pc_code.py index c0e8ca17..19e8b7d8 100644 --- a/src/openpower/oppc/pc_code.py +++ b/src/openpower/oppc/pc_code.py @@ -148,6 +148,7 @@ class CodeVisitor(pc_util.Visitor): pc_ast.Lt, pc_ast.Le, pc_ast.Eq, pc_ast.NotEq, pc_ast.Ge, pc_ast.Gt, + pc_ast.LtU, pc_ast.GtU, ) if isinstance(node.left, pc_ast.IfExpr): self.ternary(node=node.left) @@ -188,6 +189,7 @@ class CodeVisitor(pc_util.Visitor): pc_ast.Lt, pc_ast.Le, pc_ast.Eq, pc_ast.NotEq, pc_ast.Ge, pc_ast.Gt, + pc_ast.LtU, pc_ast.GtU, pc_ast.LShift, pc_ast.RShift, pc_ast.BitAnd, pc_ast.BitOr, pc_ast.BitXor, ) @@ -203,6 +205,8 @@ class CodeVisitor(pc_util.Visitor): pc_ast.Lt: "oppc_lt", pc_ast.Le: "oppc_le", pc_ast.Eq: "oppc_eq", + pc_ast.LtU: "oppc_ltu", + pc_ast.GtU: "oppc_gtu", pc_ast.NotEq: "oppc_noteq", pc_ast.Ge: "oppc_ge", pc_ast.Gt: "oppc_gt", -- 2.30.2