From 2e38e46e143eec6b6bcee744a16d3d6b4922552d Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Tue, 16 Jan 2024 22:09:45 +0300 Subject: [PATCH] oppc/code: silence unused insn --- src/openpower/oppc/pc_code.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openpower/oppc/pc_code.py b/src/openpower/oppc/pc_code.py index 4a396e21..8f1b771e 100644 --- a/src/openpower/oppc/pc_code.py +++ b/src/openpower/oppc/pc_code.py @@ -54,6 +54,8 @@ class CodeVisitor(pc_util.Visitor): self.__code[self.__header].emit(stmt=f"struct oppc_value {var};") for var in filter(lambda var: var not in operands, sorted(self.__vars)): self.__code[self.__header].emit(stmt=f"struct oppc_value {var};") + if not operands: + self.__code[self.__header].emit("(void)insn;") self.__code[self.__header].emit() for operand in insn.dynamic_operands: -- 2.30.2