add SPR rework from SPR(x) to SPR[x]
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 5 Apr 2020 16:43:14 +0000 (17:43 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 5 Apr 2020 16:43:14 +0000 (17:43 +0100)
src/soc/decoder/pseudo/parser.py

index 03d56d5dca1e43bc3dd369e2e88af49abb59c6ed..70b154e7b7c8fa3c4e3de24c4c00254153abc1dd 100644 (file)
@@ -348,7 +348,7 @@ class PowerParser:
                     if name in self.gprs:
                         # add to list of uninitialised
                         self.uninit_regs.add(name)
-            elif isinstance(p[1], ast.Call) and p[1].func.id == 'GPR':
+            elif isinstance(p[1], ast.Call) and p[1].func.id in ['GPR', 'SPR']:
                 print(astor.dump_tree(p[1]))
                 # replace GPR(x) with GPR[x]
                 idx = p[1].args[0]