[Libre-soc-bugs] [Bug 730] adapt ALU test cases to include expected results

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Oct 28 07:53:03 BST 2021


https://bugs.libre-soc.org/show_bug.cgi?id=730

--- Comment #19 from vklr at vkten.in <vklr at vkten.in> ---
def case_cmp(self):
 151         lst = ["subf. 1, 6, 7",
 152                "cmp cr2, 1, 6, 7"]
 153         initial_regs = [0] * 32
 154         initial_regs[6] = 0x10
 155         initial_regs[7] = 0x05

running test_caller_alu.py shows:
        e = ExpectedState(pc=8)
        e.intregs[1] = 0xfffffffffffffff5
        e.intregs[6] = 0x10
        e.intregs[7] = 0x5
        e.crregs[0] = 0x8
        e.crregs[2] = 0x4

for subf. 1, 6, 7
here gpr1 is 0xffff_ffff_ffff_fff5 lesser than 0 so cr0 BF 1000

for cmp cr2, 1, 6, 7
here gpr6 is 0x10 bigger than gpr7 0x5 so cr2 should be 0b010 instead of now
evaluated 0b100

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list