"MSR": 0,
"SVSTATE": 0,
- "overflow": 1,
+ "overflow": 1, # should definitely be last
}
fregs = ['FRA', 'FRB', 'FRC', 'FRS', 'FRT']
def create_args(reglist, extra=None):
retval = list(OrderedSet(reglist))
- retval.sort(key=lambda reg: REG_SORT_ORDER[reg])
+ retval.sort(key=lambda reg: REG_SORT_ORDER.get(reg, 0))
if extra is not None:
return [extra] + retval
return retval
idx = p[1].args[0].id
ridx = ast.Name("_%s" % idx, ast.Load())
p[1] = ast.Subscript(p[1].func, ridx, ast.Load())
- self.read_regs.add(idx) # add to list of regs to read
+ if idx in self.gprs:
+ self.read_regs.add(idx) # add to list of regs to read
elif isinstance(p[1], ast.Call) and p[1].func.id == 'MEM':
print("mem assign")
print(astor.dump_tree(p[1]))