Пример #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;
 }
Пример #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;
 }
Пример #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;
 }
Пример #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);
 }
Пример #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);
 }
Пример #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;
        }
Пример #7
0
 public static Memory QWord(GpVariable @base, int disp = 0)
 {
     return(new Memory(@base, disp, 8));
 }
Пример #8
0
 public static Memory DWordAbs(IntPtr pAbs, GpVariable index, int shift = 0, int disp = 0)
 {
     return(PtrAbs(pAbs, (index), shift, disp, 4));
 }
Пример #9
0
 public static Memory Byte(GpVariable @base, XmmVariable index, int shift = 0, int disp = 0)
 {
     return(Ptr(@base, index, shift, disp, 1));
 }
Пример #10
0
 public static Memory Byte(GpVariable @base, int disp = 0)
 {
     return(new Memory(@base, disp, 1));
 }
Пример #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));
 }
Пример #12
0
 private GpVariable(GpVariable other, GpRegisterType registerType, int size)
     : base(other)
 {
     RegisterType = (RegisterType)registerType;
     Size         = size;
 }
Пример #13
0
 public static Memory Ptr(GpVariable @base, int disp = 0, int size = 0)
 {
     return(new Memory(@base, disp, size));
 }
Пример #14
0
 public Memory ToMemory128(GpVariable index, int shift = 0, int disp = 0)
 {
     return(new Memory(MemoryType.StackIndex, this, index, shift, disp, 16));
 }
Пример #15
0
 public static Memory QWord(GpVariable @base, YmmVariable index, int shift = 0, int disp = 0)
 {
     return(Ptr(@base, index, shift, disp, 8));
 }
Пример #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));
 }
Пример #17
0
 public static Memory QWord(Label label, GpVariable index, int shift, int disp = 0)
 {
     return(Ptr(label, index, shift, disp, 8));
 }
Пример #18
0
 internal GpVariable(GpVariable other)
     : base(other)
 {
 }