public X86Operand(X86OperandUsage operandUsage, object value, X86ScaledIndex scaledIndex, int offset, X86OffsetType offsetType) { OperandUsage = operandUsage; Value = value; ScaledIndex = scaledIndex; Offset = offset; OffsetType = offsetType; }
private static void MakeScaledIndexOperandFromToken(X86Operand operand, byte token) { // Mechanism: // http://ref.x86asm.net/coder32.html#sib_byte_32 // SIB-byte: // mul | scaled_reg | reg // -----+------------+------- // 7 6 | 5 4 3 | 2 1 0 var scaledIndex = new X86ScaledIndex { Register = GetRegisterFromToken((byte)((token >> 3) & 7), X86RegisterSize.Dword), Multiplier = 1 << ((token >> 6) & 3), }; // ESP scales are ignored. if (scaledIndex.Register != X86Register.Esp) { operand.ScaledIndex = scaledIndex; } operand.Value = GetRegisterFromToken((byte)(token & 0x7), X86RegisterSize.Dword); }
public X86Operand(X86OperandUsage operandUsage, object value, X86ScaledIndex scaledIndex) : this(operandUsage, value, scaledIndex, 0, X86OffsetType.None) { }
private static void MakeScaledIndexOperandFromToken(X86Operand operand, byte token) { // Mechanism: // http://ref.x86asm.net/coder32.html#sib_byte_32 // SIB-byte: // mul | scaled_reg | reg // -----+------------+------- // 7 6 | 5 4 3 | 2 1 0 var scaledIndex = new X86ScaledIndex { Register = GetRegisterFromToken((byte)((token >> 3) & 7), X86RegisterSize.Dword), Multiplier = 1 << ((token >> 6) & 3), }; // ESP scales are ignored. if (scaledIndex.Register != X86Register.Esp) operand.ScaledIndex = scaledIndex; operand.Value = GetRegisterFromToken((byte)(token & 0x7), X86RegisterSize.Dword); }