if isinstance(p[1], ast.Name):
name = p[1].id
elif isinstance(p[1], ast.Subscript):
- name = p[1].value.id
- if name in self.gprs:
- # add to list of uninitialised
- self.uninit_regs.add(name)
+ if isinstance(p[1].value, ast.Name):
+ name = p[1].value.id
+ 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':
print(astor.dump_tree(p[1]))
# replace GPR(x) with GPR[x]
if __name__ == '__main__':
isa = PyISAWriter()
- isa.write_pysource('fixedshift')
+ isa.write_pysource('stringldst')
exit(0)
+ isa.write_pysource('fixedshift')
isa.write_pysource('condition')
isa.write_pysource('fixedtrap')
isa.write_pysource('branch')