oppc/code: emit symbol pseudocode
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 14 Jan 2024 12:46:49 +0000 (15:46 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 16 Jan 2024 19:10:07 +0000 (22:10 +0300)
src/openpower/oppc/pc_code.py

index 1b66a1ca1e027505faaedf1382ffd09441907ead..77bdd429a38011128ea79530680a0713c8702a65 100644 (file)
@@ -403,7 +403,8 @@ class CodeVisitor(pc_util.Visitor):
     def Symbol(self, node):
         yield node
         self.__decls[str(node)].append(node)
-        self[node].emit(stmt=f"&{str(node)}")
+        with self.pseudocode(node=node):
+            self[node].emit(stmt=f"&{str(node)}")
 
     @pc_util.Hook(pc_ast.Node)
     def Node(self, node):