separate ISAPages out from inherited ISA Class
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 9 May 2023 17:26:49 +0000 (18:26 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 9 May 2023 17:26:49 +0000 (18:26 +0100)
src/openpower/decoder/pseudo/pywriter.py

index e8ab004b5fd666ebdd86467498591db359863a10..b2f39186e0ccdb9fba42b390873206bc464bc142 100644 (file)
@@ -148,15 +148,16 @@ class PyISAWriter(ISA):
                         'import %s\n' % (page, page))
             f.write('\n')
 
-            classes = ', '.join(['ISACaller', 'ISACallerFnHelper',
-                                 'ISACallerHelper'] + self.pages_written)
-            f.write('class ISA(%s):\n' % classes)
+            f.write('class ISAPages(%s):\n' % ", ".join(self.pages_written))
             f.write('    def __init__(self, *args, **kwargs):\n')
             f.write('        super().__init__(*args, **kwargs)\n')
             f.write('        self.instrs = {\n')
             for page in self.pages_written:
                 f.write('            **self.%s_instrs,\n' % page)
             f.write('        }\n')
+            classes = ', '.join(['ISAPages', 'ISACaller', 'ISACallerFnHelper',
+                                 'ISACallerHelper'])
+            f.write('class ISA(%s): pass\n' % classes)
 
 
 def pywriter():