Beispiel #1
0
 public ReadLow16Decoder(Decoder decoder)
 {
     this.decoder = decoder;
 }
Beispiel #2
0
        static MicroMipsDisassembler()
        {
            var invalid = Instr(Mnemonic.illegal, InstrClass.Invalid);

            var pool16a = Nyi("pool16a");
            var pool16b = Nyi("pool16b");
            var pool16c = Mask(0, 6, "POOL16c",
                               Nyi("not16"),
                               Nyi("and16"),
                               Nyi("lwm16"),
                               Nyi("jrc16"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),

                               Nyi("xor16"),
                               Nyi("or16"),
                               Nyi("swm16"),
                               Nyi("jalrc16"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),

                               // 10
                               Nyi("not16"),
                               Nyi("and16"),
                               Nyi("lwm16"),
                               Instr(Mnemonic.jrcaddiusp, UIs5_sh2),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),

                               Nyi("xor16"),
                               Nyi("or16"),
                               Nyi("swm16"),
                               Nyi("break16"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),

                               // 20
                               Nyi("not16"),
                               Nyi("and16"),
                               Nyi("lwm16"),
                               Nyi("jrc16"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),

                               Nyi("xor16"),
                               Nyi("or16"),
                               Nyi("swm16"),
                               Nyi("jalrc16"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),

                               // 30
                               Nyi("not16"),
                               Nyi("and16"),
                               Nyi("lwm16"),
                               Instr(Mnemonic.jrcaddiusp, UIs5_sh2),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),

                               Nyi("xor16"),
                               Nyi("or16"),
                               Nyi("swm16"),
                               Nyi("sdbbp16"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"),
                               Nyi("movep"));

            var pool16d = Nyi("pool16d");

            var pool16e = Mask(0, 1,
                               Nyi("addiur2"),
                               Instr(Mnemonic.addiur1sp, r7, UIs(1, 6, 2)));

            var pool16f = Mask(0, 1,
                               invalid,
                               invalid);

            var pool32a = Nyi("pool32a");

            var pool32b = Mask(15, 4, "POOL32B",
                               Nyi("lwc2"),
                               Nyi("lwp"),
                               Nyi("ldc2"),
                               invalid,

                               Nyi("ldp"),
                               Nyi("lwm32"),
                               Nyi("cache"),
                               Nyi("ldm"),

                               Nyi("swc2"),
                               Nyi("swp"),
                               Nyi("sdc2"),
                               invalid,

                               Nyi("sdp"),
                               Nyi("swm32"),
                               invalid,
                               Nyi("sdm"));

            var pool32c = Nyi("pool32c");
            var pool32f = Nyi("pool32f");

            var pool32i = Mask(21, 5, "POOL32i",
                               invalid,
                               invalid,
                               invalid,
                               invalid,

                               invalid,
                               invalid,
                               invalid,
                               invalid,

                               Nyi("bc1eqz"),
                               Nyi("bc1nezc"),
                               Nyi("bc2eqzc"),
                               Nyi("bc2nezc"),

                               Nyi("synci"),
                               invalid,
                               invalid,
                               invalid,

                               Nyi("dati"),
                               Nyi("dahi"),
                               Nyi("bnz.v"),
                               Nyi("bz.v"),

                               invalid,
                               invalid,
                               invalid,
                               invalid,

                               invalid,
                               invalid,
                               invalid,
                               invalid,

                               invalid,
                               invalid,
                               invalid,
                               invalid);

            var pool32s = Nyi("pool32s");

            rootDecoder = Mask(10, 6,
                               pool32a,
                               pool16a,
                               Instr(Mnemonic.lbu16, r7, mb),
                               Nyi("move16 "),

                               Low16(Instr(Mnemonic.aui, R21, R16, SI16)),
                               Low16(Instr(Mnemonic.lbu32, R21, Mb)),
                               Low16(Instr(Mnemonic.sb32, R21, Mb)),
                               Nyi("lb32"),

                               //
                               Low16(pool32b),
                               pool16b,
                               Nyi("lhu16"),
                               Nyi("andi16"),

                               Nyi("addiu32"),
                               Nyi("lhu32"),
                               Nyi("sh32"),
                               Nyi("lh32"),

                               // 10
                               Low16(pool32i),
                               pool16c,
                               Nyi("lwsp16"),
                               pool16d,

                               Low16(Instr(Mnemonic.ori32, R21, R16, UI16)),
                               pool32f,
                               pool32s,
                               Nyi("daddiu32"),

                               //
                               pool32c,
                               Nyi("lwgp"),
                               Nyi("lw16"),
                               pool16e,

                               Low16(Instr(Mnemonic.xori32, R21, R16, UI16)),
                               Nyi("bovc /beqzalc /beqc"),
                               Nyi("addiupc /auipc / aluipc / ldpc /lwpc / lwupc"),
                               Nyi("bnvc /bnezalc /bnec"),

                               // 20
                               Nyi("beqzc/jic"),
                               pool16f,
                               Nyi("sb16"),
                               Nyi("beqzc16"),

                               Nyi("slti32"),
                               Low16(Instr(Mnemonic.bc, InstrClass.Transfer, pcRel26)),
                               Nyi("swc132"),
                               Nyi("lwc132"),

                               //
                               Instr(Mnemonic.bnezc16, InstrClass.ConditionalTransfer, r7, pcRel7),
                               invalid,
                               Instr(Mnemonic.sh16, rz7, Mh),
                               Nyi("bnezc16"),

                               Nyi("sltiu32"),
                               Nyi("balc"),
                               Low16(Instr(Mnemonic.sdc132, F21, Md)),
                               Low16(Instr(Mnemonic.ldc132, F21, Md)),

                               // 30

                               Nyi("blezalc/bgezalc/bgeuc"),
                               invalid,
                               Nyi("swsp16"),
                               Instr(Mnemonic.bc16, InstrClass.Transfer, pcRel10),

                               Low16(Instr(Mnemonic.andi32, R21, R16, UI16)),
                               Nyi("bgtzc /bltzc /bltc"),
                               Low16(Instr(Mnemonic.sd32, Is64Bit, R21, Mq)),
                               Low16(Instr(Mnemonic.ld32, Is64Bit, R21, Mq)),

                               Nyi("bgtzalc/bltzalc/bltuc"),
                               invalid,
                               Instr(Mnemonic.sw16, rz7, mw),
                               Nyi("li16"),

                               Nyi("daui"),
                               Nyi("blezc /bgezc /bgec"),
                               Low16(Instr(Mnemonic.sw32, R21, Mw)),
                               Nyi("lw32"));
        }
Beispiel #3
0
 //
 private static Decoder Low16(Decoder decoder)
 {
     return(new ReadLow16Decoder(decoder));
 }