From: Dmitry Selyutin Date: Tue, 16 Jan 2024 19:09:45 +0000 (+0300) Subject: oppc/code: check for symbol presense in pseudocode X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=238701b14ae4b6c3547fc4c995f9fffc832ea563;p=openpower-isa.git oppc/code: check for symbol presense in pseudocode --- diff --git a/src/openpower/oppc/pc_code.py b/src/openpower/oppc/pc_code.py index bf15f57f..7e143c3b 100644 --- a/src/openpower/oppc/pc_code.py +++ b/src/openpower/oppc/pc_code.py @@ -640,7 +640,8 @@ class CodeVisitor(pc_util.Visitor): if decl in ("TRAP",): self[node].emit(stmt=f"{decl}();") else: - self.__decls.add(decl) + if node in self.__pseudocode: + self.__decls.add(decl) self[node].emit(stmt=f"&{decl}") @pc_util.Hook(Instruction)