コード例 #1
0
ファイル: OpRec.cs プロジェクト: iTudou2016/reko
        internal override MipsInstruction Decode(uint wInstr, MipsDisassembler dasm)
        {
            var instr = base.Decode(wInstr, dasm);
            var imm   = instr.op3 as ImmediateOperand;

            if (imm != null && imm.Value.IsIntegerZero)
            {
                return new MipsInstruction {
                           Address = instr.Address,
                           Length  = instr.Length,
                           opcode  = Opcode.nop
                }
            }
            ;
            else
            {
                return(instr);
            }
        }
コード例 #2
0
ファイル: Decoder.cs プロジェクト: attackgithub/reko
 public override MipsInstruction Decode(uint wInstr, MipsDisassembler dasm)
 {
     foreach (var m in mutators)
     {
         if (!m(wInstr, dasm))
         {
             return(new MipsInstruction
             {
                 InstructionClass = InstrClass.Invalid,
                 Mnemonic = Mnemonic.illegal
             });
         }
     }
     return(new MipsInstruction
     {
         Mnemonic = mnemonic,
         InstructionClass = iclass,
         Address = dasm.addr,
         Length = 4,
         Operands = dasm.ops.ToArray()
     });
 }
コード例 #3
0
 internal override MipsInstruction Decode(uint wInstr, MipsDisassembler dasm)
 {
     foreach (var m in mutators)
     {
         if (!m(wInstr, dasm))
         {
             return(new MipsInstruction
             {
                 iclass = InstrClass.Invalid,
                 opcode = Opcode.illegal
             });
         }
     }
     return(new MipsInstruction
     {
         opcode = opcode,
         iclass = iclass,
         Address = dasm.addr,
         Length = 4,
         op1 = dasm.ops.Count > 0 ? dasm.ops[0] : null,
         op2 = dasm.ops.Count > 1 ? dasm.ops[1] : null,
         op3 = dasm.ops.Count > 2 ? dasm.ops[2] : null,
     });
 }
コード例 #4
0
ファイル: OpRec.cs プロジェクト: olivierh59500/reko
 internal override MipsInstruction Decode(uint wInstr, MipsDisassembler dasm)
 {
     return(dasm.DecodeOperands(opcode, wInstr, format));
 }
コード例 #5
0
ファイル: OpRec.cs プロジェクト: olivierh59500/reko
        internal override MipsInstruction Decode(uint wInstr, MipsDisassembler dasm)
        {
            var opcode = ((wInstr & (1u << 16)) != 0) ? opTrue : opFalse;

            return(dasm.DecodeOperands(opcode, wInstr, "c18,j"));
        }
コード例 #6
0
ファイル: OpRec.cs プロジェクト: olivierh59500/reko
 internal override MipsInstruction Decode(uint wInstr, MipsDisassembler dasm)
 {
     return(oprecs[wInstr & 0x3F].Decode(wInstr, dasm));
 }
コード例 #7
0
ファイル: OpRec.cs プロジェクト: olivierh59500/reko
 internal abstract MipsInstruction Decode(uint wInstr, MipsDisassembler dasm);
コード例 #8
0
ファイル: OpRec.cs プロジェクト: olivierh59500/reko
        internal override MipsInstruction Decode(uint wInstr, MipsDisassembler dasm)
        {
            var opcode = opcodes[(wInstr >> 16) & 0x1F];

            return(dasm.DecodeOperands(opcode, wInstr, "R1,j"));
        }
コード例 #9
0
ファイル: Decoder.cs プロジェクト: Seabreg/reko
            public override MipsInstruction Decode(uint wInstr, MipsDisassembler dasm)
            {
                var decoder = ((wInstr & (1u << 16)) != 0) ? opTrue : opFalse;

                return(decoder.Decode(wInstr, dasm));
            }
コード例 #10
0
        internal override MipsInstruction Decode(uint wInstr, MipsDisassembler dasm)
        {
            var opcode = ((wInstr & (1u << 16)) != 0) ? opTrue : opFalse;

            return(dasm.DecodeOperands(wInstr, opcode, InstrClass.ConditionalTransfer | InstrClass.Delay, "c18,j"));
        }
コード例 #11
0
        internal override MipsInstruction Decode(uint wInstr, MipsDisassembler dasm)
        {
            var decoder = decoders[(wInstr >> 16) & 0x1F];

            return(decoder.Decode(wInstr, dasm));
        }
コード例 #12
0
        internal override MipsInstruction Decode(uint wInstr, MipsDisassembler dasm)
        {
            int iDecoder = (int)((wInstr >> shift) & mask);

            return(decoders[iDecoder].Decode(wInstr, dasm));
        }