Esempio n. 1
0
 public static bool IsSegmentRegister(this Register register)
 {
     #region Contract
     Contract.Requires <InvalidEnumArgumentException>(Enum.IsDefined(typeof(Register), register));
     #endregion
     return(register.GetRegisterType() == RegisterType.Segment);
 }
Esempio n. 2
0
 public static bool IsSimdRegister(this Register register)
 {
     #region Contract
     Contract.Requires <InvalidEnumArgumentException>(Enum.IsDefined(typeof(Register), register));
     #endregion
     var registerType = register.GetRegisterType();
     return(registerType == RegisterType.Simd64Bit ||
            registerType == RegisterType.Simd128Bit);
 }
Esempio n. 3
0
 public static bool IsGeneralPurposeRegister(this Register register)
 {
     #region Contract
     Contract.Requires <InvalidEnumArgumentException>(Enum.IsDefined(typeof(Register), register));
     #endregion
     var registerType = register.GetRegisterType();
     return(registerType == RegisterType.GeneralPurpose8Bit ||
            registerType == RegisterType.GeneralPurpose16Bit ||
            registerType == RegisterType.GeneralPurpose32Bit ||
            registerType == RegisterType.GeneralPurpose64Bit);
 }
            /// <summary>
            /// Initializes a new instance of the <see cref="OperandDescriptor"/> structure.
            /// </summary>
            /// <param name="register">The fixed <see cref="Register"/> value of the operand.</param>
            public OperandDescriptor(Register register)
            {
                #region Contract
                Contract.Requires <InvalidEnumArgumentException>(Enum.IsDefined(typeof(Register), register));
                #endregion

                this.operandType     = OperandType.FixedRegister;
                this.registerType    = register.GetRegisterType();
                this.size            = register.GetSize();
                this.fixedRegister   = register;
                this.operandEncoding = OperandEncoding.Default;
            }