Ejemplo n.º 1
0
 private void WriteOpCode(X86OpCode opCode)
 {
     if (opCode.TwoBytePrefix != 0)
     {
         _writer.WriteByte(0xF);
     }
     _writer.WriteByte(opCode.Op1);
     // todo: multibyte opcodes.
 }
Ejemplo n.º 2
0
 public bool CanPrecedeOpCode(X86OpCode opcode)
 {
     if (_mnemonics != null)
     {
         return(_mnemonics.Any(x => opcode.Mnemonics.Contains(x)));
     }
     if (_operandSizes != null)
     {
         return(_operandSizes.Contains(opcode.OperandSize3) ||
                _operandSizes.Any(x => opcode.OperandSizes1.Contains(x) || opcode.OperandSizes2.Contains(x)));
     }
     if (_operandTypes != null)
     {
         return(_operandTypes.Contains(opcode.OperandType3) ||
                _operandTypes.Any(x => opcode.OperandTypes1.Contains(x) || opcode.OperandTypes2.Contains(x)));
     }
     return(false);
 }
Ejemplo n.º 3
0
 private void WriteOpCode(X86OpCode opCode)
 {
     _writer.WriteByte(opCode.Op1);
     // todo: multibyte opcodes.
 }