no python files to be committed in isafunctions
[openpower-isa.git] / src / openpower / decoder / pseudo / parser.py
index 2d6d295e4f8c78d25a57925371b4d956ca2a1772..4f11f6f14c996caf50ddb5a83e99c2a9e1e707c7 100644 (file)
@@ -201,6 +201,10 @@ def apply_trailer(atom, trailer, read_regs):
                 name = arg.id
                 if name in regs + fregs:
                     read_regs.add(name)
+        # special-case, function named "SVSTATE_NEXT" must be made "self.xxxx"
+        if atom.id == 'SVSTATE_NEXT':
+            name = ast.Name("self", ast.Load())
+            atom = ast.Attribute(name, atom, ast.Load())
         return ast.Call(atom, trailer[1], [])
         # if p[1].id == 'print':
         #    p[0] = ast.Printnl(ast.Tuple(p[2][1]), None, None)