예제 #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
 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));
        }