aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-08-10 05:12:40 +0000
committerAndrew Cagney <cagney@redhat.com>2002-08-10 05:12:40 +0000
commitb063e7a269b0493ce192d76a85c41fe16210dcd4 (patch)
treea5c94c007f7c43abd8f84d792954240d29db2c17
parenta7e3c2ad4b6733e3011e00d214ec83139fa3c3d2 (diff)
downloadgdb-b063e7a269b0493ce192d76a85c41fe16210dcd4.zip
gdb-b063e7a269b0493ce192d76a85c41fe16210dcd4.tar.gz
gdb-b063e7a269b0493ce192d76a85c41fe16210dcd4.tar.bz2
2002-08-10 Andrew Cagney <cagney@redhat.com>
Elena Zannoni <ezannoni@redhat.com> Martin M. Hunt <hunt@redhat.com> * gdbtypes.c (build_builtin_type_vec128): Set the vector bit. (build_builtin_type_vec128i): Set the vector bit. * gdbtypes.h (builtin_type_vec64, builtin_type_vec64i): Declare. * gdbtypes.c (builtin_type_vec64, builtin_type_vec64i): Define. (build_builtin_type_vec64): New function. (build_builtin_type_vec64i): New function. (build_gdbtypes): Initialize builtin_type_vec64 and builtin_type_vec64i.
-rw-r--r--gdb/ChangeLog13
-rw-r--r--gdb/gdbtypes.c64
-rw-r--r--gdb/gdbtypes.h4
3 files changed, 80 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 53f5c66..152ca31 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,16 @@
+2002-08-10 Andrew Cagney <cagney@redhat.com>
+ Elena Zannoni <ezannoni@redhat.com>
+ Martin M. Hunt <hunt@redhat.com>
+
+ * gdbtypes.c (build_builtin_type_vec128): Set the vector bit.
+ (build_builtin_type_vec128i): Set the vector bit.
+ * gdbtypes.h (builtin_type_vec64, builtin_type_vec64i): Declare.
+ * gdbtypes.c (builtin_type_vec64, builtin_type_vec64i): Define.
+ (build_builtin_type_vec64): New function.
+ (build_builtin_type_vec64i): New function.
+ (build_gdbtypes): Initialize builtin_type_vec64 and
+ builtin_type_vec64i.
+
2002-08-09 Andrew Cagney <cagney@redhat.com>
* regcache.c (regcache_dump): Compare the register offset
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 7db3f9a..677f088 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -92,6 +92,8 @@ struct type *builtin_type_v8qi;
struct type *builtin_type_v8hi;
struct type *builtin_type_v4hi;
struct type *builtin_type_v2si;
+struct type *builtin_type_vec64;
+struct type *builtin_type_vec64i;
struct type *builtin_type_vec128;
struct type *builtin_type_vec128i;
struct type *builtin_type_ieee_single_big;
@@ -819,6 +821,62 @@ init_vector_type (struct type *elt_type, int n)
}
static struct type *
+build_builtin_type_vec64 (void)
+{
+ /* Construct a type for the 64 bit registers. The type we're
+ building is this: */
+#if 0
+ union __gdb_builtin_type_vec64
+ {
+ int64_t uint64;
+ float v2_float[2];
+ int32_t v2_int32[2];
+ int16_t v4_int16[4];
+ int8_t v8_int8[8];
+ };
+#endif
+
+ struct type *t;
+
+ t = init_composite_type ("__gdb_builtin_type_vec64", TYPE_CODE_UNION);
+ append_composite_type_field (t, "uint64", builtin_type_int64);
+ append_composite_type_field (t, "v2_float", builtin_type_v2_float);
+ append_composite_type_field (t, "v2_int32", builtin_type_v2_int32);
+ append_composite_type_field (t, "v4_int16", builtin_type_v4_int16);
+ append_composite_type_field (t, "v8_int8", builtin_type_v8_int8);
+
+ TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
+ return t;
+}
+
+static struct type *
+build_builtin_type_vec64i (void)
+{
+ /* Construct a type for the 64 bit registers. The type we're
+ building is this: */
+#if 0
+ union __gdb_builtin_type_vec64i
+ {
+ int64_t uint64;
+ int32_t v2_int32[2];
+ int16_t v4_int16[4];
+ int8_t v8_int8[8];
+ };
+#endif
+
+ struct type *t;
+
+ t = init_composite_type ("__gdb_builtin_type_vec64i", TYPE_CODE_UNION);
+ append_composite_type_field (t, "uint64", builtin_type_int64);
+ append_composite_type_field (t, "v2_int32", builtin_type_v2_int32);
+ append_composite_type_field (t, "v4_int16", builtin_type_v4_int16);
+ append_composite_type_field (t, "v8_int8", builtin_type_v8_int8);
+
+ TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
+ return t;
+}
+
+static struct type *
build_builtin_type_vec128 (void)
{
/* Construct a type for the 128 bit registers. The type we're
@@ -843,6 +901,7 @@ build_builtin_type_vec128 (void)
append_composite_type_field (t, "v8_int16", builtin_type_v8_int16);
append_composite_type_field (t, "v16_int8", builtin_type_v16_int8);
+ TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
return t;
}
@@ -861,6 +920,7 @@ build_builtin_type_vec128i (void)
append_composite_type_field (t, "v2_int64", builtin_type_v2_int64);
append_composite_type_field (t, "uint128", builtin_type_int128);
+ TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
return t;
}
@@ -3324,7 +3384,9 @@ build_gdbtypes (void)
builtin_type_v4_int16 = init_vector_type (builtin_type_int16, 4);
builtin_type_v8_int8 = init_vector_type (builtin_type_int8, 8);
- /* Vector types. */
+ /* Vector types. */
+ builtin_type_vec64 = build_builtin_type_vec64 ();
+ builtin_type_vec64i = build_builtin_type_vec64i ();
builtin_type_vec128 = build_builtin_type_vec128 ();
builtin_type_vec128i = build_builtin_type_vec128i ();
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index b67c54f..5c41398 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -952,6 +952,10 @@ extern struct type *builtin_type_v8hi;
extern struct type *builtin_type_v4hi;
extern struct type *builtin_type_v2si;
+/* Type for 64 bit vectors. */
+extern struct type *builtin_type_vec64;
+extern struct type *builtin_type_vec64i;
+
/* Type for 128 bit vectors. */
extern struct type *builtin_type_vec128;
extern struct type *builtin_type_vec128i;