Exemple #1
0
 public static void GetDefaultStoredDataType(ref x86StoredDataType StoredDataTypePart, int Size)
 {
     if (StoredDataTypePart.TypeKind == x86TypeKind.Unknown)
     {
         StoredDataTypePart = GetDefaultStoredDataType(Size);
     }
 }
Exemple #2
0
        public static string GetSSETypeString(x86StoredDataType StoredDataType)
        {
            var Kind      = StoredDataType.TypeKind;
            var Precision = StoredDataType.Precision;

            if (Precision == -1 || Kind == x86TypeKind.Unknown)
            {
                throw new ArgumentException(null, "Identifier");
            }

            if (Kind == x86TypeKind.Float)
            {
                if (Precision == 4)
                {
                    return("ss");
                }
                else if (Precision == 8)
                {
                    return("sd");
                }
                else
                {
                    throw new ApplicationException();
                }
            }
            else if (Kind == x86TypeKind.FloatVector)
            {
                if (Precision == 4)
                {
                    return("ps");
                }
                else if (Precision == 8)
                {
                    return("pd");
                }
                else
                {
                    throw new ApplicationException();
                }
            }
            else if (IsNonfloatTypeKind(Kind))
            {
                if (Precision == 1)
                {
                    return("b");
                }
                else if (Precision == 2)
                {
                    return("w");
                }
                else if (Precision == 4)
                {
                    return("d");
                }
                else if (Precision == 8)
                {
                    return("q");
                }
                else if (Precision == 16)
                {
                    return("dq");
                }
                else
                {
                    throw new ApplicationException();
                }
            }
            else
            {
                throw new ApplicationException();
            }
        }
Exemple #3
0
 public static x86StoredDataType GetVectorStoredDataType(x86StoredDataType StoredDataType)
 {
     StoredDataType.TypeKind = GetVectorTypeKind(StoredDataType.TypeKind);
     return(StoredDataType);
 }
Exemple #4
0
 public static void GetVectorStoredDataType(ref x86StoredDataType StoredDataType)
 {
     StoredDataType.TypeKind = GetVectorTypeKind(StoredDataType.TypeKind);
 }
Exemple #5
0
 public static void GetDefaultStoredDataType(ref x86StoredDataType StoredDataTypePart, x86DataLocation Location)
 {
     GetDefaultStoredDataType(ref StoredDataTypePart, Location.Size);
 }
Exemple #6
0
 public bool IsEquivalent(x86StoredDataType Other)
 {
     return(TypeKind == Other.TypeKind && Precision == Other.Precision);
 }