add list of gprs which need to access GPR functions (code-rewrite)
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 31 Mar 2020 13:03:37 +0000 (14:03 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 31 Mar 2020 13:04:57 +0000 (14:04 +0100)
src/soc/decoder/power_pseudo.py

index d6436b16fc43a6e48f59e9dcf4c733e81054dc2a..5e9c5179e8d4cc6df2bfa7f703d78f6b06aff681 100644 (file)
@@ -468,6 +468,11 @@ class IndentLexer(PowerLexer):
 
 class PowerParser:
 
+    def __init__(self):
+        self.gprs = {}
+        for rname in ['RA', 'RB', 'RC', 'RT']:
+            self.gprs[rname] = None
+
     # The grammar comments come from Python's Grammar/Grammar file
 
     ## NB: compound_stmt in single_input is followed by extra NEWLINE!