[Libre-soc-bugs] [Bug 509] divwe. causing assertion failure in handle_comparison

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sat Oct 3 02:15:23 BST 2020


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

--- Comment #1 from Jacob Lifshay <programmerjake at gmail.com> ---
Generated divwe. python code:
    @inject()
    def op_divwe_(self, RA, RB, RT):
        dividend = concat(0, repeat=64)
        dividend[0:64] = concat(RA[32:64], concat(0, repeat=32))
        divisor = concat(0, repeat=64)
        divisor[0:64] = EXTS64(RB[32:64])
        if eq(divisor, SelectableInt(value=0x0, bits=64)):
            overflow = 1
        else:
            result = DIVS(dividend, divisor)
            result32 = concat(0, repeat=64)
            result32[0:64] = EXTS64(result[32:64])
            if eq(result32, result):
                RT[32:64] = result[32:64]
                RT[0:32] = undefined[0:32]
                overflow = 0
            else:
                overflow = 1
        if eq(overflow, 1):
            RT[0:64] = undefined[0:64]
        return (overflow, RT,)

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


More information about the libre-soc-bugs mailing list