2004-08-07 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Sat, 7 Aug 2004 19:25:58 +0000 (19:25 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sat, 7 Aug 2004 19:25:58 +0000 (19:25 +0000)
* gdbtypes.h (struct builtin_type): Delete builtin_int0 through to
builtin_uint128.
* gdbtypes.c (gdbtypes_post_init): Update.
(build_gdbtypes): Move initialization of builtin_type_int0
through to builtin_type_uint128 from here ...
(_initialize_gdbtypes): ... to here.
* d10v-tdep.c (d10v_register_type): Update.

gdb/ChangeLog
gdb/d10v-tdep.c
gdb/gdbtypes.c
gdb/gdbtypes.h

index 051b616d810a8fc53ec17cbe1351960df06c4715..f3924789aad5401e812161d0476d8a593a209c9c 100644 (file)
@@ -1,5 +1,13 @@
 2004-08-07  Andrew Cagney  <cagney@gnu.org>
 
+       * gdbtypes.h (struct builtin_type): Delete builtin_int0 through to
+       builtin_uint128.
+       * gdbtypes.c (gdbtypes_post_init): Update.
+       (build_gdbtypes): Move initialization of builtin_type_int0
+       through to builtin_type_uint128 from here ...
+       (_initialize_gdbtypes): ... to here.
+       * d10v-tdep.c (d10v_register_type): Update.
+
        * doublest.c: Update copyright.
        (floatformat_from_length): Call error when floatformat is NULL.
        (extract_floating_by_length): Remove NULL fmt check.
index 274f5db02a618f652200787e67599629c98911db..ea44721c61149a9007f3deed498f89ecacfac759 100644 (file)
@@ -287,9 +287,9 @@ d10v_register_type (struct gdbarch *gdbarch, int reg_nr)
     return builtin_type (gdbarch)->builtin_data_ptr;
   else if (reg_nr >= a0_regnum (gdbarch)
           && reg_nr < (a0_regnum (gdbarch) + NR_A_REGS))
-    return builtin_type (gdbarch)->builtin_int64;
+    return builtin_type_int64;
   else
-    return builtin_type (gdbarch)->builtin_int16;
+    return builtin_type_int16;
 }
 
 static int
index d954bd55aa768ddba5b97e2a1cc203eaa5217464..4d00aab04145d4b9b258898b943c60008e6bc81c 100644 (file)
@@ -3215,50 +3215,6 @@ build_gdbtypes (void)
     init_type (TYPE_CODE_STRING, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
               0,
               "string", (struct objfile *) NULL);
-  builtin_type_int0 =
-    init_type (TYPE_CODE_INT, 0 / 8,
-              0,
-              "int0_t", (struct objfile *) NULL);
-  builtin_type_int8 =
-    init_type (TYPE_CODE_INT, 8 / 8,
-              0,
-              "int8_t", (struct objfile *) NULL);
-  builtin_type_uint8 =
-    init_type (TYPE_CODE_INT, 8 / 8,
-              TYPE_FLAG_UNSIGNED,
-              "uint8_t", (struct objfile *) NULL);
-  builtin_type_int16 =
-    init_type (TYPE_CODE_INT, 16 / 8,
-              0,
-              "int16_t", (struct objfile *) NULL);
-  builtin_type_uint16 =
-    init_type (TYPE_CODE_INT, 16 / 8,
-              TYPE_FLAG_UNSIGNED,
-              "uint16_t", (struct objfile *) NULL);
-  builtin_type_int32 =
-    init_type (TYPE_CODE_INT, 32 / 8,
-              0,
-              "int32_t", (struct objfile *) NULL);
-  builtin_type_uint32 =
-    init_type (TYPE_CODE_INT, 32 / 8,
-              TYPE_FLAG_UNSIGNED,
-              "uint32_t", (struct objfile *) NULL);
-  builtin_type_int64 =
-    init_type (TYPE_CODE_INT, 64 / 8,
-              0,
-              "int64_t", (struct objfile *) NULL);
-  builtin_type_uint64 =
-    init_type (TYPE_CODE_INT, 64 / 8,
-              TYPE_FLAG_UNSIGNED,
-              "uint64_t", (struct objfile *) NULL);
-  builtin_type_int128 =
-    init_type (TYPE_CODE_INT, 128 / 8,
-              0,
-              "int128_t", (struct objfile *) NULL);
-  builtin_type_uint128 =
-    init_type (TYPE_CODE_INT, 128 / 8,
-              TYPE_FLAG_UNSIGNED,
-              "uint128_t", (struct objfile *) NULL);
   builtin_type_bool =
     init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
               0,
@@ -3444,50 +3400,6 @@ gdbtypes_post_init (struct gdbarch *gdbarch)
     init_type (TYPE_CODE_STRING, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
               0,
               "string", (struct objfile *) NULL);
-  builtin_type->builtin_int0 =
-    init_type (TYPE_CODE_INT, 0 / 8,
-              0,
-              "int0_t", (struct objfile *) NULL);
-  builtin_type->builtin_int8 =
-    init_type (TYPE_CODE_INT, 8 / 8,
-              0,
-              "int8_t", (struct objfile *) NULL);
-  builtin_type->builtin_uint8 =
-    init_type (TYPE_CODE_INT, 8 / 8,
-              TYPE_FLAG_UNSIGNED,
-              "uint8_t", (struct objfile *) NULL);
-  builtin_type->builtin_int16 =
-    init_type (TYPE_CODE_INT, 16 / 8,
-              0,
-              "int16_t", (struct objfile *) NULL);
-  builtin_type->builtin_uint16 =
-    init_type (TYPE_CODE_INT, 16 / 8,
-              TYPE_FLAG_UNSIGNED,
-              "uint16_t", (struct objfile *) NULL);
-  builtin_type->builtin_int32 =
-    init_type (TYPE_CODE_INT, 32 / 8,
-              0,
-              "int32_t", (struct objfile *) NULL);
-  builtin_type->builtin_uint32 =
-    init_type (TYPE_CODE_INT, 32 / 8,
-              TYPE_FLAG_UNSIGNED,
-              "uint32_t", (struct objfile *) NULL);
-  builtin_type->builtin_int64 =
-    init_type (TYPE_CODE_INT, 64 / 8,
-              0,
-              "int64_t", (struct objfile *) NULL);
-  builtin_type->builtin_uint64 =
-    init_type (TYPE_CODE_INT, 64 / 8,
-              TYPE_FLAG_UNSIGNED,
-              "uint64_t", (struct objfile *) NULL);
-  builtin_type->builtin_int128 =
-    init_type (TYPE_CODE_INT, 128 / 8,
-              0,
-              "int128_t", (struct objfile *) NULL);
-  builtin_type->builtin_uint128 =
-    init_type (TYPE_CODE_INT, 128 / 8,
-              TYPE_FLAG_UNSIGNED,
-              "uint128_t", (struct objfile *) NULL);
   builtin_type->builtin_bool =
     init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
               0,
@@ -3538,6 +3450,52 @@ void
 _initialize_gdbtypes (void)
 {
   struct cmd_list_element *c;
+
+  builtin_type_int0 =
+    init_type (TYPE_CODE_INT, 0 / 8,
+              0,
+              "int0_t", (struct objfile *) NULL);
+  builtin_type_int8 =
+    init_type (TYPE_CODE_INT, 8 / 8,
+              0,
+              "int8_t", (struct objfile *) NULL);
+  builtin_type_uint8 =
+    init_type (TYPE_CODE_INT, 8 / 8,
+              TYPE_FLAG_UNSIGNED,
+              "uint8_t", (struct objfile *) NULL);
+  builtin_type_int16 =
+    init_type (TYPE_CODE_INT, 16 / 8,
+              0,
+              "int16_t", (struct objfile *) NULL);
+  builtin_type_uint16 =
+    init_type (TYPE_CODE_INT, 16 / 8,
+              TYPE_FLAG_UNSIGNED,
+              "uint16_t", (struct objfile *) NULL);
+  builtin_type_int32 =
+    init_type (TYPE_CODE_INT, 32 / 8,
+              0,
+              "int32_t", (struct objfile *) NULL);
+  builtin_type_uint32 =
+    init_type (TYPE_CODE_INT, 32 / 8,
+              TYPE_FLAG_UNSIGNED,
+              "uint32_t", (struct objfile *) NULL);
+  builtin_type_int64 =
+    init_type (TYPE_CODE_INT, 64 / 8,
+              0,
+              "int64_t", (struct objfile *) NULL);
+  builtin_type_uint64 =
+    init_type (TYPE_CODE_INT, 64 / 8,
+              TYPE_FLAG_UNSIGNED,
+              "uint64_t", (struct objfile *) NULL);
+  builtin_type_int128 =
+    init_type (TYPE_CODE_INT, 128 / 8,
+              0,
+              "int128_t", (struct objfile *) NULL);
+  builtin_type_uint128 =
+    init_type (TYPE_CODE_INT, 128 / 8,
+              TYPE_FLAG_UNSIGNED,
+              "uint128_t", (struct objfile *) NULL);
+
   build_gdbtypes ();
 
   gdbtypes_data = gdbarch_data_register_post_init (gdbtypes_post_init);
index bc3e5a3f207697ec2d54b55f495c2100cb839756..a9d98dcbfddc63864a566ccd3b57af43cbfc9cad 100644 (file)
@@ -946,25 +946,6 @@ struct builtin_type
 
   /* Integral types.  */
 
-  /* Explicit sizes.  These are assumed to be 2's complement and in
-     the architecture's byte order.  The "int0" is for when an ISA
-     needs to describe a register that has no size.  The naming schema
-     is based on C9X <intypes.h>.  */
-  /* FIXME: cagney/2004-07-26: As with floating-point, there should be
-     explicit big, little and little-byte-big-word endian types that
-     exist outside of the architecture vector.  */
-  struct type *builtin_int0;
-  struct type *builtin_int8;
-  struct type *builtin_uint8;
-  struct type *builtin_int16;
-  struct type *builtin_uint16;
-  struct type *builtin_int32;
-  struct type *builtin_uint32;
-  struct type *builtin_int64;
-  struct type *builtin_uint64;
-  struct type *builtin_int128;
-  struct type *builtin_uint128;
-
   /* We use this for the '/c' print format, because c_char is just a
      one-byte integral type, which languages less laid back than C
      will print as ... well, a one-byte integral type.  */