header = """\
# auto-generated by pywriter.py, do not edit or commit
-from soc.decoder.isa.caller import inject, instruction_info
-from soc.decoder.helpers import (EXTS, EXTS64, EXTZ64, ROTL64, ROTL32, MASK,
- ne, eq, gt, ge, lt, le, ltu, gtu, length,
+from openpower.decoder.isa.caller import inject, instruction_info
+from openpower.decoder.helpers import (EXTS, EXTS64, EXTZ64, ROTL64, ROTL32,
+ MASK, ne, eq, gt, ge, lt, le, ltu, gtu, length,
trunc_divs, trunc_rems, MULS, DIVS, MODS,
EXTS128, undefined)
-from soc.decoder.selectable_int import SelectableInt
-from soc.decoder.selectable_int import selectconcat as concat
-from soc.decoder.orderedset import OrderedSet
+from openpower.decoder.selectable_int import SelectableInt
+from openpower.decoder.selectable_int import selectconcat as concat
+from openpower.decoder.orderedset import OrderedSet
class %s:
def write_pysource(self, pagename):
self.pages_written.append(pagename)
- instrs = isa.page[pagename]
+ instrs = self.page[pagename]
isadir = get_isasrc_dir()
fname = os.path.join(isadir, "%s.py" % pagename)
with open(fname, "w") as f:
f.write('# auto-generated by pywriter.py: do not edit or commit\n')
f.write('from soc.decoder.isa.caller import ISACaller\n')
for page in self.pages_written:
- f.write('from soc.decoder.isa.%s import %s\n' % (page, page))
+ f.write('from openpower.decoder.isa.%s ' \
+ 'import %s\n' % (page, page))
f.write('\n')
classes = ', '.join(['ISACaller'] + self.pages_written)