From: Dmitry Selyutin Date: Tue, 16 Jan 2024 19:09:45 +0000 (+0300) Subject: oppc/code: silence unused insn X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e38e46e143eec6b6bcee744a16d3d6b4922552d;p=openpower-isa.git oppc/code: silence unused insn --- 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: