示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Inc"/> class.
 /// </summary>
 /// <param name="subject">The subject register operand.</param>
 public Inc(RegisterOperand subject)
     : this((Operand)subject)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(subject != null);
     #endregion
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JmpNear"/> class.
 /// </summary>
 /// <param name="target">The register containing the new near jump target address.</param>
 public JmpNear(RegisterOperand target)
     : this((Operand)target)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(target != null);
     #endregion
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Mul"/> class.
 /// </summary>
 /// <param name="multiplier">The multiplier.</param>
 public Mul(RegisterOperand multiplier)
     : this((Operand)multiplier)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(multiplier != null);
     #endregion
 }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Pop"/> class.
 /// </summary>
 /// <param name="destination">The destination memory operand.</param>
 public Pop(RegisterOperand destination)
     : this((Operand)destination)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(destination != null);
     #endregion
 }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="In"/> class.
 /// </summary>
 /// <param name="port">The port.</param>
 public In(RegisterOperand port)
     : this((Operand)port)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(port != null);
     #endregion
 }
示例#6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Not"/> class.
 /// </summary>
 /// <param name="value">The value.</param>
 public Not(RegisterOperand value)
     : this((Operand)value)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(value != null);
     #endregion
 }
示例#7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Bsf"/> class.
 /// </summary>
 /// <param name="destination">The register in which the bit's index will be stored.</param>
 /// <param name="subject">The register operand which is checked.</param>
 public Bsf(RegisterOperand destination, RegisterOperand subject)
     : this(destination, (Operand)subject)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(destination != null);
     Contract.Requires<ArgumentNullException>(subject != null);
     #endregion
 }
示例#8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Popcnt"/> class.
 /// </summary>
 /// <param name="destination">The register in which the bit's index will be stored.</param>
 /// <param name="subject">The memory operand which is checked.</param>
 public Popcnt(RegisterOperand destination, EffectiveAddress subject)
     : this(destination, (Operand)subject)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(destination != null);
     Contract.Requires<ArgumentNullException>(subject != null);
     #endregion
 }
示例#9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Xadd"/> class.
 /// </summary>
 /// <param name="destination">The destination register operand.</param>
 /// <param name="source">The source immediate register operand.</param>
 public Xadd(RegisterOperand destination, RegisterOperand source)
     : this((Operand)destination, source)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(destination != null);
     Contract.Requires<ArgumentNullException>(source != null);
     #endregion
 }
示例#10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Cmpxchg"/> class.
 /// </summary>
 /// <param name="compared">The memory operand being compared.</param>
 /// <param name="source">The source operand.</param>
 public Cmpxchg(EffectiveAddress compared, RegisterOperand source)
     : this((Operand)compared, source)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(compared != null);
     Contract.Requires<ArgumentNullException>(source != null);
     #endregion
 }
示例#11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Movsxd"/> class.
 /// </summary>
 /// <param name="destination">The destination register.</param>
 /// <param name="source">The source memory operand.</param>
 public Movsxd(RegisterOperand destination, EffectiveAddress source)
     : this(destination, (Operand)source)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(destination != null);
     Contract.Requires<ArgumentNullException>(source != null);
     #endregion
 }
示例#12
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Bswap"/> class.
        /// </summary>
        /// <param name="subject">The register whose bytes will be swapped.</param>
        public Bswap(RegisterOperand subject)
        {
            #region Contract
            Contract.Requires<ArgumentNullException>(subject != null);
            #endregion

            this.subject = subject;
        }
示例#13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Btc"/> class.
 /// </summary>
 /// <param name="subject">The memory operand whose bit is copied and toggled.</param>
 /// <param name="bitIndex">The index of the bit to copy.</param>
 public Btc(EffectiveAddress subject, RegisterOperand bitIndex)
     : this((Operand)subject, (Operand)bitIndex)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(subject != null);
     Contract.Requires<ArgumentNullException>(bitIndex != null);
     #endregion
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ArithmeticInstruction"/> class.
 /// </summary>
 /// <param name="destination">The destination register operand.</param>
 /// <param name="source">The source immediate operand.</param>
 protected ArithmeticInstruction(RegisterOperand destination, Immediate source)
     : this((IRegisterOrMemoryOperand)destination, (ISourceOperand)source)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(destination != null);
     Contract.Requires<ArgumentException>(destination.Register.IsGeneralPurposeRegister());
     Contract.Requires<ArgumentNullException>(source != null);
     #endregion
 }
示例#15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Shrd"/> class.
 /// </summary>
 /// <param name="value">The value to shift.</param>
 /// <param name="source">The bits to shift in.</param>
 /// <param name="positions">The number of positions to adjust.</param>
 public Shrd(RegisterOperand value, RegisterOperand source, Immediate positions)
     : this((Operand)positions, source, (Operand)positions)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(value != null);
     Contract.Requires<ArgumentNullException>(source != null);
     Contract.Requires<ArgumentNullException>(positions != null);
     #endregion
 }
示例#16
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Bound"/> class.
        /// </summary>
        /// <param name="index">The array index to check.</param>
        /// <param name="bounds">Memory address of two (double)words specifying the lower and upper limits of the
        /// array.</param>
        public Bound(RegisterOperand index, EffectiveAddress bounds)
        {
            #region Contract
            Contract.Requires<ArgumentNullException>(index != null);
            Contract.Requires<ArgumentNullException>(bounds != null);
            #endregion

            this.index = index;
            this.bounds = bounds;
        }
示例#17
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Movmskpd"/> class.
        /// </summary>
        /// <param name="destination">The destination register.</param>
        /// <param name="source">The source register.</param>
        public Movmskpd(RegisterOperand destination, RegisterOperand source)
        {
            #region Contract
            Contract.Requires<ArgumentNullException>(destination != null);
            Contract.Requires<ArgumentNullException>(source != null);
            #endregion

            this.destination = destination;
            this.source = source;
        }
示例#18
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Lds"/> class.
        /// </summary>
        /// <param name="destination">The destination operand.</param>
        /// <param name="source">The source operand.</param>
        public Lds(RegisterOperand destination, EffectiveAddress source)
        {
            #region Contract
            Contract.Requires<ArgumentNullException>(destination != null);
            Contract.Requires<ArgumentNullException>(source != null);
            #endregion

            this.destination = destination;
            this.source = source;
        }
示例#19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Lea"/> class.
        /// </summary>
        /// <param name="destination">The destination register operand.</param>
        /// <param name="address">The address.</param>
        public Lea(RegisterOperand destination, EffectiveAddress address)
        {
            #region Contract
            Contract.Requires<ArgumentNullException>(destination != null);
            Contract.Requires<ArgumentNullException>(address != null);
            #endregion

            this.destination = destination;
            this.address = address;
        }
示例#20
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Xadd"/> class.
        /// </summary>
        /// <param name="destination">The destination operand.</param>
        /// <param name="source">The source operand.</param>
        private Xadd(Operand destination, RegisterOperand source)
        {
            #region Contract
            Contract.Requires<ArgumentNullException>(destination != null);
            Contract.Requires<InvalidCastException>(
                    destination is EffectiveAddress ||
                    destination is RegisterOperand);
            Contract.Requires<ArgumentNullException>(source != null);
            #endregion

            this.destination = destination;
            this.source = source;
        }
示例#21
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Cmpxchg"/> class.
        /// </summary>
        /// <param name="compared">The operand being compared.</param>
        /// <param name="source">The source operand.</param>
        private Cmpxchg(Operand compared, RegisterOperand source)
        {
            #region Contract
            Contract.Requires<ArgumentNullException>(compared != null);
            Contract.Requires<InvalidCastException>(
                    compared is EffectiveAddress ||
                    compared is RegisterOperand);
            Contract.Requires<ArgumentNullException>(source != null);
            #endregion

            this.compared = compared;
            this.source = source;
        }
示例#22
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Popcnt"/> class.
        /// </summary>
        /// <param name="destination">The register in which the bit's index will be stored.</param>
        /// <param name="subject">The register or memory operand which is checked.</param>
        private Popcnt(RegisterOperand destination, Operand subject)
        {
            #region Contract
            Contract.Requires<ArgumentNullException>(destination != null);
            Contract.Requires<ArgumentNullException>(subject != null);
            Contract.Requires<InvalidCastException>(
                    subject is EffectiveAddress ||
                    subject is RegisterOperand);
            #endregion

            this.destination = destination;
            this.subject = subject;
        }
示例#23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Sbb"/> class.
 /// </summary>
 /// <param name="destination">The destination memory operand.</param>
 /// <param name="source">The source immediate register operand.</param>
 public Sbb(EffectiveAddress destination, RegisterOperand source)
     : this((Operand)destination, (Operand)source)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(destination != null);
     Contract.Requires<ArgumentNullException>(source != null);
     #endregion
 }
示例#24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Sbb"/> class.
 /// </summary>
 /// <param name="destination">The destination register operand.</param>
 /// <param name="source">The source immediate value.</param>
 public Sbb(RegisterOperand destination, Immediate source)
     : this((Operand)destination, (Operand)source)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(destination != null);
     Contract.Requires<ArgumentNullException>(source != null);
     #endregion
 }
示例#25
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Imul"/> class.
        /// </summary>
        /// <param name="destination">The destination operand.</param>
        /// <param name="source">The source operand.</param>
        /// <param name="multiplier">The multiplier.</param>
        private Imul(RegisterOperand destination, Operand source, Operand multiplier)
        {
            #region Contract
            Contract.Requires<ArgumentNullException>(multiplier != null);
            Contract.Requires<InvalidCastException>(
                    multiplier is Immediate ||
                    multiplier is EffectiveAddress ||
                    multiplier is RegisterOperand);
            Contract.Requires<InvalidCastException>(source == null || (
                    source is EffectiveAddress ||
                    source is RegisterOperand));
            #endregion

            this.destination = destination;
            this.source = source;
            this.multiplier = multiplier;
        }
示例#26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Shrd"/> class.
 /// </summary>
 /// <param name="value">The value to shift.</param>
 /// <param name="source">The bits to shift in.</param>
 /// <param name="positions">The register with number of positions to adjust.
 /// May only be the CL register; or <see langword="null"/> to use the CL register.</param>
 public Shrd(EffectiveAddress value, RegisterOperand source, RegisterOperand positions = null)
     : this((Operand)value, source, (Operand)positions)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(value != null);
     Contract.Requires<ArgumentNullException>(source != null);
     Contract.Requires<ArgumentNullException>(positions != null);
     #endregion
 }
示例#27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Shr"/> class.
 /// </summary>
 /// <param name="value">The value to change.</param>
 /// <param name="positions">The register containing the number of positions to adjust.</param>
 public Shr(RegisterOperand value, RegisterOperand positions)
     : this((Operand)value, (Operand)positions)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(value != null);
     Contract.Requires<ArgumentNullException>(positions != null);
     #endregion
 }
示例#28
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Shrd"/> class.
        /// </summary>
        /// <param name="value">The value to shift.</param>
        /// <param name="source">The bits to shift in.</param>
        /// <param name="positions">The number of positions to adjust;
        /// or <see langword="null"/> to adjust one position.</param>
        private Shrd(Operand value, RegisterOperand source, Operand positions)
        {
            #region Contract
            Contract.Requires<ArgumentNullException>(value != null);
            Contract.Requires<InvalidCastException>(
                    value is EffectiveAddress ||
                    value is RegisterOperand);
            Contract.Requires<ArgumentNullException>(source != null);
            Contract.Requires<InvalidCastException>(positions == null || (
                    positions is Immediate ||
                    positions is RegisterOperand));
            #endregion

            this.value = value;
            this.source = source;
            this.positions = positions;
        }
示例#29
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Bt"/> class.
 /// </summary>
 /// <param name="subject">The register operand whose bit is copied.</param>
 /// <param name="bitindex">The index of the bit to copy.</param>
 public Bt(RegisterOperand subject, Immediate bitindex)
     : this((Operand)subject, (Operand)bitindex)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(subject != null);
     Contract.Requires<ArgumentNullException>(bitindex != null);
     #endregion
 }
示例#30
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Set"/> class.
 /// </summary>
 /// <param name="destination">The destination register.</param>
 /// <param name="condition">The condition on which this instruction executes.</param>
 public Set(RegisterOperand destination, InstructionCondition condition)
     : this((Operand)destination, condition)
 {
     #region Contract
     Contract.Requires<ArgumentNullException>(destination != null);
     Contract.Requires<InvalidEnumArgumentException>(Enum.IsDefined(typeof(InstructionCondition), condition));
     Contract.Requires<ArgumentException>(condition != InstructionCondition.None);
     #endregion
 }