From: Dmitry Selyutin Date: Sun, 14 Jan 2024 13:43:00 +0000 (+0300) Subject: oppc/code: support unsigned comparisons X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=df3f6e7e9788664da43bf81e86f489e8914f2a4a;p=openpower-isa.git oppc/code: support unsigned comparisons --- 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",