m = Module()
comb = m.d.comb
op = self.dec.op
- m.submodules.ppick = ppick = PriorityPicker(8)
+ m.submodules.ppick = ppick = PriorityPicker(8, reverse_i=True,
+ reverse_o=True)
comb += self.cr_bitfield.ok.eq(0)
comb += self.whole_reg.ok.eq(0)
p.assembly = '\n'.join(dis)+'\n'
self.add_case(p, initial_cr=cr)
+ def case_mtocrf_regression(self):
+ """microwatt 1.bin regression, same hack as above.
+ 106b4: 21 d9 96 7d .long 0x7d96d921 # mtocrf 12, 0b01101101
+ """
+ mask = 0b01101101
+ dis = [f"mtocrf 12, {mask}"]
+ lst = bytes([0x21, 0xd9, 0x96, 0x7d]) # 0x7d96d921
+ cr = 0x529e08fe
+ initial_regs = [0] * 32
+ initial_regs[12] = 0xffffffffffffffff
+ p = Program(lst, bigendian)
+ p.assembly = '\n'.join(dis)+'\n'
+ self.add_case(p, initial_regs=initial_regs, initial_cr=cr)
+
def case_mfocrf_1(self):
lst = [f"mfocrf 2, 1"]
cr = 0x1234
cr = yield from get_dmi(dmi, DBGCore.CR)
print ("after test %s cr value %x" % (test.name, cr))
- # get CR
+ # get XER
xer = yield from get_dmi(dmi, DBGCore.XER)
print ("after test %s XER value %x" % (test.name, xer))