2007-10-25 Wu Zhou <woodzltc@cn.ibm.com>
[binutils-gdb.git] / gdb / gdbtypes.c
index 838bfcffeee09fc93a3a1a8b5976d23ff02f3fbd..7400d68b4b933207271adec8a825660d43fdd9b4 100644 (file)
@@ -705,8 +705,6 @@ create_range_type (struct type *result_type, struct type *index_type,
   memset (TYPE_FIELDS (result_type), 0, 2 * sizeof (struct field));
   TYPE_FIELD_BITPOS (result_type, 0) = low_bound;
   TYPE_FIELD_BITPOS (result_type, 1) = high_bound;
-  TYPE_FIELD_TYPE (result_type, 0) = builtin_type_int; /* FIXME */
-  TYPE_FIELD_TYPE (result_type, 1) = builtin_type_int; /* FIXME */
 
   if (low_bound >= 0)
     TYPE_FLAGS (result_type) |= TYPE_FLAG_UNSIGNED;
@@ -950,7 +948,7 @@ init_vector_type (struct type *elt_type, int n)
  
   array_type = create_array_type (0, elt_type,
                                  create_range_type (0, 
-                                                    builtin_type_int,
+                                                    builtin_type_int32,
                                                     0, n-1));
   make_vector_type (array_type);
   return array_type;
@@ -3508,6 +3506,21 @@ gdbtypes_post_init (struct gdbarch *gdbarch)
               0,
               "bool", (struct objfile *) NULL);
 
+  /* The following three are about decimal floating point types, which
+     are 32-bits, 64-bits and 128-bits respectively.  */
+  builtin_type->builtin_decfloat
+    = init_type (TYPE_CODE_DECFLOAT, 32 / 8,
+               0,
+              "decimal float", (struct objfile *) NULL);
+  builtin_type->builtin_decdouble
+    = init_type (TYPE_CODE_DECFLOAT, 64 / 8,
+              0,
+              "decimal double", (struct objfile *) NULL);
+  builtin_type->builtin_declong
+    = init_type (TYPE_CODE_DECFLOAT, 128 / 8,
+              0,
+              "decimal long double", (struct objfile *) NULL);
+
   /* Pointer/Address types.  */
 
   /* NOTE: on some targets, addresses and pointers are not necessarily