return (CR,)
@inject()
-- def op_cmpeqb(self, RB, CR):
+- def op_cmpeqb(self, RA, RB, CR):
- src1 = GPR[RA]
- src1 = src1[56:64]
+ def op_cmpeqb(self, RA, RB, CR):
return (CR,)
comparefixed_instrs = {}
-@@ -136,7 +135,7 @@
- form='X',
- asmregs=[['BF', 'L', 'RA', 'RB']])
- comparefixed_instrs['cmpeqb'] = instruction_info(func=op_cmpeqb,
-- read_regs=OrderedSet(['RB']),
-+ read_regs=OrderedSet(['RA', 'RB']),
- uninit_regs=OrderedSet(), write_regs=OrderedSet(['CR']),
- special_regs=OrderedSet(['CR']), op_fields=OrderedSet(['BF']),
- form='X',
print(astor.dump_tree(p[1]))
# replace GPR(x) with GPR[x]
idx = p[1].args[0]
+ # and add index to read_regs if it is a gpr
+ if idx in self.gprs:
+ self.read_regs.add(name)
p[1] = ast.Subscript(p[1].func, idx, ast.Load())
elif isinstance(p[1], ast.Call) and p[1].func.id == 'MEM':
print("mem assign")