Exemplo n.º 1
0
 internal Memory(MemoryType memType, GpVariable @base, int disp, int size)
     : base(OperandType.Memory, size)
 {
     Id           = @base.Id;
     MemoryType   = memType;
     Displacement = disp;
     Index        = RegisterIndex.Invalid;
 }
Exemplo n.º 2
0
 internal Memory(GpVariable @base, int disp, int size = 0)
     : base(OperandType.Memory, size)
 {
     Id           = @base.Id;
     MemoryType   = MemoryType.BaseIndex;
     Displacement = disp;
     Flags        = GetGpdFlags(@base) + (Constants.X86.MemVSibGpz << Constants.X86.MemVSibIndex);
     Index        = RegisterIndex.Invalid;
 }
Exemplo n.º 3
0
 internal Memory(MemoryType memType, GpVariable @base, GpVariable index, int shift, int disp, int size = 0)
     : base(OperandType.Memory, size)
 {
     Id           = @base.Id;
     MemoryType   = memType;
     Displacement = disp;
     Index        = index.Id;
     Flags        = shift << Constants.X86.MemShiftIndex;
 }
Exemplo n.º 4
0
 internal Memory(GpVariable @base, GpVariable index, int shift, int disp, int size = 0)
     : base(OperandType.Memory, size)
 {
     Id           = @base.Id;
     MemoryType   = MemoryType.BaseIndex;
     Displacement = disp;
     Index        = index.Id;
     Flags        = GetGpdFlags(@base) + (shift << Constants.X86.MemShiftIndex);
 }
Exemplo n.º 5
0
 internal Memory(Label label, GpVariable index, int shift, int disp, int size = 0)
     : base(OperandType.Memory, size)
 {
     Id           = label.Id;
     MemoryType   = MemoryType.Label;
     Displacement = disp;
     Index        = index.Id;
     Flags        = GetGpdFlags(index) + (shift << Constants.X86.MemShiftIndex);
 }
Exemplo n.º 6
0
        internal Memory(MemoryType memType, GpVariable index, int shift, int disp, int size = 0)
            : base(OperandType.Memory, size)
        {
            MemoryType   = memType;
            Displacement = disp;
            Index        = index.RegisterIndex;
            var flags = shift << Constants.X86.MemShiftIndex;

            if (index.IsGp())
            {
                flags |= GetGpdFlags(index);
            }
            else if (index.IsXmm())
            {
                flags |= Constants.X86.MemVSibXmm << Constants.X86.MemVSibIndex;
            }
            else if (index.IsYmm())
            {
                flags |= Constants.X86.MemVSibYmm << Constants.X86.MemVSibIndex;
            }

            Flags = flags;
        }
Exemplo n.º 7
0
 public static Memory QWord(GpVariable @base, int disp = 0)
 {
     return(new Memory(@base, disp, 8));
 }
Exemplo n.º 8
0
 public static Memory DWordAbs(IntPtr pAbs, GpVariable index, int shift = 0, int disp = 0)
 {
     return(PtrAbs(pAbs, (index), shift, disp, 4));
 }
Exemplo n.º 9
0
 public static Memory Byte(GpVariable @base, XmmVariable index, int shift = 0, int disp = 0)
 {
     return(Ptr(@base, index, shift, disp, 1));
 }
Exemplo n.º 10
0
 public static Memory Byte(GpVariable @base, int disp = 0)
 {
     return(new Memory(@base, disp, 1));
 }
Exemplo n.º 11
0
 public static Memory Ptr(Label label, GpVariable index, int shift, int disp = 0, int size = 0)
 {
     return(new Memory(label, index, shift, disp, size));
 }
Exemplo n.º 12
0
 private GpVariable(GpVariable other, GpRegisterType registerType, int size)
     : base(other)
 {
     RegisterType = (RegisterType)registerType;
     Size         = size;
 }
Exemplo n.º 13
0
 public static Memory Ptr(GpVariable @base, int disp = 0, int size = 0)
 {
     return(new Memory(@base, disp, size));
 }
Exemplo n.º 14
0
 public Memory ToMemory128(GpVariable index, int shift = 0, int disp = 0)
 {
     return(new Memory(MemoryType.StackIndex, this, index, shift, disp, 16));
 }
Exemplo n.º 15
0
 public static Memory QWord(GpVariable @base, YmmVariable index, int shift = 0, int disp = 0)
 {
     return(Ptr(@base, index, shift, disp, 8));
 }
Exemplo n.º 16
0
 public static Memory Ptr(GpVariable @base, YmmVariable index, int shift = 0, int disp = 0, int size = 0)
 {
     return(new Memory(@base, index, shift, disp, size));
 }
Exemplo n.º 17
0
 public static Memory QWord(Label label, GpVariable index, int shift, int disp = 0)
 {
     return(Ptr(label, index, shift, disp, 8));
 }
Exemplo n.º 18
0
 internal GpVariable(GpVariable other)
     : base(other)
 {
 }