summaryrefslogtreecommitdiffstats
path: root/gdb/gdbtypes.c
diff options
context:
space:
mode:
authorMartin Hunt <hunt@redhat.com>2002-05-27 09:17:24 +0000
committerMartin Hunt <hunt@redhat.com>2002-05-27 09:17:24 +0000
commit3139facc61e1f4b0af8b814d6775590188b3d79c (patch)
tree336ea54597640e31c1b30b83730b3aa625c5d9cd /gdb/gdbtypes.c
parent3eee1e9d04a0b9337ac03282c8483531cd21d536 (diff)
downloadppe42-binutils-3139facc61e1f4b0af8b814d6775590188b3d79c.tar.gz
ppe42-binutils-3139facc61e1f4b0af8b814d6775590188b3d79c.zip
2002-05-27 Martin M. Hunt <hunt@redhat.com>
* i386-tdep.c (i386_register_virtual_type): Return builtin_type_vec128i for SSE registers. * gdbtypes.h (builtin_type_vec128i): Declare. * gdbtypes.c (build_builtin_type_vec128i): New function. (builtin_type_v2_double, builtin_type_v4_int64): New types. (builtin_type_vec128i): New type for SSE2 128-bit registers. (build_gdbtypes): Initialize new builtin vector types. (_initialize_gdbtypes): Register new vector types with gdbarch.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r--gdb/gdbtypes.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index e8ba96d103..0f757f5a12 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -73,7 +73,9 @@ struct type *builtin_type_uint128;
struct type *builtin_type_bool;
/* 128 bit long vector types */
+struct type *builtin_type_v2_double;
struct type *builtin_type_v4_float;
+struct type *builtin_type_v2_int64;
struct type *builtin_type_v4_int32;
struct type *builtin_type_v8_int16;
struct type *builtin_type_v16_int8;
@@ -91,6 +93,7 @@ struct type *builtin_type_v8hi;
struct type *builtin_type_v4hi;
struct type *builtin_type_v2si;
struct type *builtin_type_vec128;
+struct type *builtin_type_vec128i;
struct type *builtin_type_ieee_single_big;
struct type *builtin_type_ieee_single_little;
struct type *builtin_type_ieee_double_big;
@@ -844,6 +847,24 @@ build_builtin_type_vec128 (void)
return t;
}
+static struct type *
+build_builtin_type_vec128i (void)
+{
+ /* 128-bit Intel SIMD registers */
+ struct type *t;
+
+ t = init_composite_type ("__gdb_builtin_type_vec128i", TYPE_CODE_UNION);
+ append_composite_type_field (t, "v4_float", builtin_type_v4_float);
+ append_composite_type_field (t, "v2_double", builtin_type_v2_double);
+ append_composite_type_field (t, "v16_int8", builtin_type_v16_int8);
+ append_composite_type_field (t, "v8_int16", builtin_type_v8_int16);
+ append_composite_type_field (t, "v4_int32", builtin_type_v4_int32);
+ append_composite_type_field (t, "v2_int64", builtin_type_v2_int64);
+ append_composite_type_field (t, "uint128", builtin_type_int128);
+
+ return t;
+}
+
/* Smash TYPE to be a type of members of DOMAIN with type TO_TYPE.
A MEMBER is a wierd thing -- it amounts to a typed offset into
a struct, e.g. "an int at offset 8". A MEMBER TYPE doesn't
@@ -3300,7 +3321,9 @@ build_gdbtypes (void)
= init_simd_type ("__builtin_v2si", builtin_type_int32, "f", 2);
/* 128 bit vectors. */
+ builtin_type_v2_double = init_vector_type (builtin_type_double, 2);
builtin_type_v4_float = init_vector_type (builtin_type_float, 4);
+ builtin_type_v2_int64 = init_vector_type (builtin_type_int64, 2);
builtin_type_v4_int32 = init_vector_type (builtin_type_int32, 4);
builtin_type_v8_int16 = init_vector_type (builtin_type_int16, 8);
builtin_type_v16_int8 = init_vector_type (builtin_type_int8, 16);
@@ -3312,6 +3335,7 @@ build_gdbtypes (void)
/* Vector types. */
builtin_type_vec128 = build_builtin_type_vec128 ();
+ builtin_type_vec128i = build_builtin_type_vec128i ();
/* Pointer/Address types. */
@@ -3400,7 +3424,9 @@ _initialize_gdbtypes (void)
register_gdbarch_swap (&builtin_type_v8hi, sizeof (struct type *), NULL);
register_gdbarch_swap (&builtin_type_v4hi, sizeof (struct type *), NULL);
register_gdbarch_swap (&builtin_type_v2si, sizeof (struct type *), NULL);
+ register_gdbarch_swap (&builtin_type_v2_double, sizeof (struct type *), NULL);
register_gdbarch_swap (&builtin_type_v4_float, sizeof (struct type *), NULL);
+ register_gdbarch_swap (&builtin_type_v2_int64, sizeof (struct type *), NULL);
register_gdbarch_swap (&builtin_type_v4_int32, sizeof (struct type *), NULL);
register_gdbarch_swap (&builtin_type_v8_int16, sizeof (struct type *), NULL);
register_gdbarch_swap (&builtin_type_v16_int8, sizeof (struct type *), NULL);
@@ -3409,6 +3435,7 @@ _initialize_gdbtypes (void)
register_gdbarch_swap (&builtin_type_v8_int8, sizeof (struct type *), NULL);
register_gdbarch_swap (&builtin_type_v4_int16, sizeof (struct type *), NULL);
register_gdbarch_swap (&builtin_type_vec128, sizeof (struct type *), NULL);
+ register_gdbarch_swap (&builtin_type_vec128i, sizeof (struct type *), NULL);
REGISTER_GDBARCH_SWAP (builtin_type_void_data_ptr);
REGISTER_GDBARCH_SWAP (builtin_type_void_func_ptr);
REGISTER_GDBARCH_SWAP (builtin_type_CORE_ADDR);
OpenPOWER on IntegriCloud