Пример #1
0
        public LoadKnownRegister(EmitStateInfo state, OperandType register)
            : base(state)
        {
            if (!IsKnownRegister(register))
            {
                throw new ArgumentException("Regsiter is not valid.");
            }

            this.Register = register;
        }
Пример #2
0
        public LoadRegister(EmitStateInfo state, int registerSize)
            : base(state)
        {
            if (registerSize != 1 && registerSize != 2 && registerSize != 4)
            {
                throw new ArgumentException("Invalid register size.");
            }

            this.RegisterSize = registerSize;
        }
Пример #3
0
        public LoadMoffs(EmitStateInfo state, int valueSize)
            : base(state)
        {
            if (valueSize != 1 && valueSize != 2 && valueSize != 4 && valueSize != 8)
            {
                throw new ArgumentException("Invalid size.");
            }

            this.ValueSize = valueSize;
        }
Пример #4
0
        public LoadImmediate(EmitStateInfo state, int immediateSize, ValueExtend valueExtend)
            : base(state)
        {
            if (immediateSize != 1 && immediateSize != 2 && immediateSize != 4 && immediateSize != 6 && immediateSize != 8)
            {
                throw new ArgumentException("Unsupported immediate size.");
            }

            this.ImmediateSize = immediateSize;
            this.ValueExtend   = valueExtend;
        }
Пример #5
0
 public static LoadRegRmw CreateFloat(EmitStateInfo state, int valueSize)
 {
     if (state.AddressMode == 16)
     {
         return(new LoadRegRmw16(state, valueSize, true, true, false, false));
     }
     else if (state.AddressMode == 32)
     {
         return(new LoadRegRmw32(state, valueSize, true, true, false, false));
     }
     else
     {
         throw new ArgumentException("Invalid addressing mode.");
     }
 }
Пример #6
0
 public static LoadRegRmw CreateEffectiveAddress(EmitStateInfo state)
 {
     if (state.AddressMode == 16)
     {
         return(new LoadRegRmw16(state, 2, true, false, true, false));
     }
     else if (state.AddressMode == 32)
     {
         return(new LoadRegRmw32(state, 4, true, false, true, false));
     }
     else
     {
         throw new ArgumentException("Invalid addressing mode.");
     }
 }
Пример #7
0
        protected LoadRegRmw(EmitStateInfo state, int valueSize, bool memoryOnly, bool floatingPoint, bool offsetOnly, bool linearAddressOnly)
            : base(state)
        {
            if (valueSize != 1 && valueSize != 2 && valueSize != 4 && valueSize != 6 && valueSize != 8 && valueSize != 10)
            {
                throw new ArgumentException("Invalid size.");
            }
            if (!memoryOnly && offsetOnly)
            {
                throw new ArgumentException("Effective address invalid for registers.");
            }

            this.ValueSize         = valueSize;
            this.MemoryOnly        = memoryOnly;
            this.FloatingPoint     = floatingPoint;
            this.OffsetOnly        = offsetOnly;
            this.LinearAddressOnly = linearAddressOnly;
        }
Пример #8
0
 public LoadSegmentRegister(EmitStateInfo state)
     : base(state)
 {
 }
Пример #9
0
 protected Emitter(EmitStateInfo state)
 {
     this.il    = state.IL;
     this.state = state;
 }
Пример #10
0
 public LoadRegRmw32(EmitStateInfo state, int valueSize, bool memoryOnly, bool floatingPoint, bool offsetOnly, bool linearAddressOnly)
     : base(state, valueSize, memoryOnly, floatingPoint, offsetOnly, linearAddressOnly)
 {
 }
Пример #11
0
 public LoadDebugRegister(EmitStateInfo state)
     : base(state)
 {
 }