[Libre-soc-bugs] [Bug 898] binutils svp64 objdump support

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Aug 19 16:08:01 BST 2022


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

--- Comment #2 from Dmitry Selyutin <ghostmansd at gmail.com> ---
Here are the new-style fields:

class RM(Fields):
    """SVP64 RM: https://libre-soc.org/openpower/sv/svp64/"""
    spr: Field = range(24)
    mmode: Field = (0,)
    mask: Field = range(1, 4)
    elwidth: Field = range(4, 6)
    ewsrc: Field = range(6, 8)
    subvl: Field = range(8, 10)
    extra: Field = range(10, 19)
    mode: Field = range(19, 24)
    extra2: Field[4] = (
        range(10, 12),
        range(12, 14),
        range(14, 16),
        range(16, 18),
    )
    smask: Field = range(16, 19)
    extra3: Field[3] = (
        range(10, 13),
        range(13, 16),
        range(16, 19),
    )


class Prefix(Fields):
    """SVP64 Prefix: https://libre-soc.org/openpower/sv/svp64/"""
    insn: Field = range(32)
    major: Field = range(0, 6)
    pid: Field = (7, 9)
    rm: RM = ((6, 8) + tuple(range(10, 32)))


for (name, fields) in {"RM": RM, "Prefix.rm": Prefix.rm}.items():
    print(name)
    for (key, value) in fields:
        print("    ", key, value)


The output is:

RM
     spr (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23)
     mmode (0,)
     mask (1, 2, 3)
     elwidth (4, 5)
     ewsrc (6, 7)
     subvl (8, 9)
     extra (10, 11, 12, 13, 14, 15, 16, 17, 18)
     mode (19, 20, 21, 22, 23)
     extra2 ((10, 11), (12, 13), (14, 15), (16, 17))
     smask (16, 17, 18)
     extra3 ((10, 11, 12), (13, 14, 15), (16, 17, 18))
Prefix.rm
     spr (6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31)
     mmode (6,)
     mask (8, 10, 11)
     elwidth (12, 13)
     ewsrc (14, 15)
     subvl (16, 17)
     extra (18, 19, 20, 21, 22, 23, 24, 25, 26)
     mode (27, 28, 29, 30, 31)
     extra2 ((18, 19), (20, 21), (22, 23), (24, 25))
     smask (24, 25, 26)
     extra3 ((18, 19, 20), (21, 22, 23), (24, 25, 26))

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


More information about the libre-soc-bugs mailing list