From 238701b14ae4b6c3547fc4c995f9fffc832ea563 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Tue, 16 Jan 2024 22:09:45 +0300 Subject: [PATCH] oppc/code: check for symbol presense in pseudocode --- src/openpower/oppc/pc_code.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.30.2