oppc/code: deprecate redundant ampersands
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 14 Jan 2024 20:52:36 +0000 (23:52 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 16 Jan 2024 19:10:07 +0000 (22:10 +0300)
src/openpower/oppc/pc_code.py

index 41e95c6c9de336b7d84086209f39cee796092c6b..04dcf23630605cfc00dabf232a76364a2564ff3a 100644 (file)
@@ -387,7 +387,7 @@ class CodeVisitor(pc_util.Visitor):
     def GPR(self, node):
         yield node
         with self.pseudocode(node=node):
-            self[node].emit(stmt=f"&OPPC_GPR[OPPC_GPR_{str(node)}]")
+            self[node].emit(stmt=f"OPPC_GPR_{str(node)}")
 
     @pc_util.Hook(pc_ast.GPRZero)
     def GPRZero(self, node):
@@ -406,7 +406,7 @@ class CodeVisitor(pc_util.Visitor):
     def FPR(self, node):
         yield node
         with self.pseudocode(node=node):
-            self[node].emit(stmt=f"&OPPC_FPR[OPPC_FPR_{str(node)}]")
+            self[node].emit(stmt=f"OPPC_FPR_{str(node)}")
 
     @pc_util.Hook(pc_ast.RepeatExpr)
     def RepeatExpr(self, node):
@@ -434,7 +434,7 @@ class CodeVisitor(pc_util.Visitor):
     def Special(self, node):
         yield node
         with self.pseudocode(node=node):
-            self[node].emit(stmt=f"&OPPC_{str(node).upper()}")
+            self[node].emit(stmt=f"OPPC_{str(node).upper()}")
 
     @pc_util.Hook(pc_ast.SubscriptExpr)
     def SubscriptExpr(self, node):