oppc/code: translate None to NULL
authorDmitry Selyutin <ghostmansd@gmail.com>
Tue, 16 Jan 2024 19:09:45 +0000 (22:09 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 16 Jan 2024 19:10:08 +0000 (22:10 +0300)
src/openpower/oppc/pc_code.py

index df5fa3195cd307b60d27c548bbfe471c9f2390e1..4a396e21d41e7ed951a5eb3cc4d0c86aa181ea8b 100644 (file)
@@ -649,7 +649,9 @@ class CodeVisitor(pc_util.Visitor):
             var = str(node)
             if var not in ("fallthrough",):
                 if var in ("TRAP",):
-                    self[node].emit(stmt=f"OPPC_CALL_{var}();")
+                    self[node].emit(stmt=f"OPPC_CALL_{var}0();")
+                elif var == "None":
+                    self[node].emit(stmt=f"NULL")
                 else:
                     if node in self.__pseudocode:
                         self.__vars.add(var)