[libre-riscv-dev] [Bug 173] dynamic partitioned "shift"

bugzilla-daemon at libre-riscv.org bugzilla-daemon at libre-riscv.org
Thu Feb 13 19:52:46 GMT 2020


http://bugs.libre-riscv.org/show_bug.cgi?id=173

--- Comment #19 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
ah!

def decodelist(l):
    res = []
    for (idx, sgn) in l:
        sgn = " " if sgn else "~"
        res.append("%sp%d" % (sgn, idx))
    return '&'.join(res)

N = 4
M = 4

for i in range(1,N):
    l = []
    for j in range(i):
        l.append([j, False])
    print i, j
    k = 0
    s = decodelist(l)
    print "if %s: o3 |= a%db%d" % (s, i, k)
    k += 1
    while l:
        l[0][1] = True
        s = decodelist(l)
        print "if %s: o3 |= a%db%d" % (s, i, k)
        k += 1
        del l[0]

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


More information about the libre-riscv-dev mailing list