[Libre-soc-bugs] [Bug 1154] Support basic PowerPC generated assembly

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Sep 10 17:42:34 BST 2023


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

--- Comment #6 from Dmitry Selyutin <ghostmansd at gmail.com> ---
Damn, this proves to be more difficult than I thought. :-)
We already have a big table sorted by opcodes for disassembler, but obviously
sorting by opcodes makes no sense when we try to look up a name.
Currently the best option I'm thinking is another table:

// opcodes table
    [73] = {
        .name = "svshape",
        .opcode = {
            .value = UINT32_C(0x0000000058000019),
            .mask = UINT32_C(0x00000000fc0007bf),
        },
        .operands = {
            [0] = UINT8_C(0x1b), /* SVxd */
            [1] = UINT8_C(0x1c), /* SVyd */
            [2] = UINT8_C(0x1d), /* SVzd */
            [3] = UINT8_C(0x1e), /* SVrm */
            [4] = UINT8_C(0x1f), /* vf */
            [5] = UINT8_C(0x00), /* NIL */
        },
    },
    [80] = {
        .name = "svshape",
        .opcode = {
            .value = UINT32_C(0x0000000058000099),
            .mask = UINT32_C(0x00000000fc0007bf),
        },
        .operands = {
            [0] = UINT8_C(0x1b), /* SVxd */
            [1] = UINT8_C(0x1c), /* SVyd */
            [2] = UINT8_C(0x1d), /* SVzd */
            [3] = UINT8_C(0x1e), /* SVrm */
            [4] = UINT8_C(0x1f), /* vf */
            [5] = UINT8_C(0x00), /* NIL */
        },
    },

// names table
/* svshape */
        /* 010110---------------0000-011001 */ [650] = 73,
        /* 010110---------------0001-011001 */ [651] = 80,


Then there will be another table sorted by name which contains a pair of
integers assigned to each name (e.g. 650 and 663). I'm still working on sorting
this.

We actually I think have only two of these pigs -- isel and svshape. But I
still would like to have a generic and uniform algorithm.

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


More information about the libre-soc-bugs mailing list