From: Dmitry Selyutin Date: Sun, 14 Jan 2024 14:43:19 +0000 (+0300) Subject: oppc/code: support leave keyword X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f1337a0748b5cfb728680c41b72138eabdcad6c0;p=openpower-isa.git oppc/code: support leave keyword --- diff --git a/src/openpower/oppc/pc_code.py b/src/openpower/oppc/pc_code.py index bbacaff1..22adf1e5 100644 --- a/src/openpower/oppc/pc_code.py +++ b/src/openpower/oppc/pc_code.py @@ -462,6 +462,11 @@ class CodeVisitor(pc_util.Visitor): yield node self[node].emit(stmt=str(node)) + @pc_util.Hook(pc_ast.LeaveKeyword) + def LeaveKeyword(self, node): + yield node + self[node].emit(stmt="break;") + @pc_util.Hook(pc_ast.Call.Name) def CallName(self, node): yield node