Example #1
0
 public override IntelInstruction Decode(X86Disassembler disasm, byte op, string opFormat)
 {
     if (disasm.f2PrefixSeen)
     {
         return(disasm.DecodeOperands(this.opF2, op, opF2Fmt));
     }
     else if (disasm.f3PrefixSeen)
     {
         return(disasm.DecodeOperands(this.opF3, op, opF3Fmt));
     }
     else if (disasm.dataSizeOverride)
     {
         if (disasm.useRexPrefix && (disasm.rexPrefix & 8) != 0)
         {
             return(disasm.DecodeOperands(this.op66Wide, op, op66Fmt));
         }
         else
         {
             return(disasm.DecodeOperands(this.op66, op, op66Fmt));
         }
     }
     else
     {
         if (disasm.useRexPrefix && (disasm.rexPrefix & 8) != 0)
         {
             return(disasm.DecodeOperands(this.opWide, op, opFmt));
         }
         else
         {
             return(disasm.DecodeOperands(this.op, op, opFmt));
         }
     }
 }
Example #2
0
 public override IntelInstruction Decode(X86Disassembler disasm, byte op, string opFormat)
 {
     if (disasm.rdr.PeekByte(0) == 0x0F)
     {
         disasm.f2PrefixSeen = true;
         if (!disasm.rdr.TryReadByte(out op))
         {
             return(null);
         }
         return(s_aOpRec[op].Decode(disasm, op, opFormat));
     }
     return(disasm.DecodeOperands(Opcode.repne, 0xF2, opFormat));
 }
Example #3
0
            public override IntelInstruction Decode(X86Disassembler disasm, byte op, string opFormat)
            {
                byte b = disasm.rdr.PeekByte(0);

                if (b == 0x0F)
                {
                    disasm.f3PrefixSeen = true;
                    if (!disasm.rdr.TryReadByte(out op))
                    {
                        return(null);
                    }
                    return(s_aOpRec[op].Decode(disasm, op, opFormat));
                }
                if (b == 0xC3)
                {
                    op = disasm.rdr.ReadByte();
                    return(s_aOpRec[b].Decode(disasm, op, opFormat));
                }
                return(disasm.DecodeOperands(Opcode.rep, 0xF3, opFormat));
            }
Example #4
0
 public override IntelInstruction Decode(X86Disassembler disasm, byte op, string opFormat)
 {
     return(disasm.DecodeOperands(opcode, op, opFormat + format));
 }