2002-05-27 Martin M. Hunt <hunt@redhat.com>
authorMartin Hunt <hunt@redhat.com>
Mon, 27 May 2002 09:17:24 +0000 (09:17 +0000)
committerMartin Hunt <hunt@redhat.com>
Mon, 27 May 2002 09:17:24 +0000 (09:17 +0000)
* 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.

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

index 7c97317b45b96ca1a405e4511cf61ed4d91c760b..351de5e09acd5b8a61f6f1f32245d65d9ff5a5e4 100644 (file)
@@ -1,3 +1,16 @@
+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.
+
 2002-05-26  Jason Thorpe  <thorpej@wasabisystems.com>
 
        * MAINTAINERS: ns32k is not longer an obsolete candidate,
        * config/ns32k/tm-umax.h (REGISTER_NAMES): Remove.
        (REGISTER_NAME): Define as ns32k_register_name_32082.
 
+>>>>>>> 1.2703
 2002-05-24  Jim Blandy  <jimb@redhat.com>
 
        * dwarf2read.c (free_line_header): Use xfree, not free.
        (d10v_init_extra_frame_info): Get fi->pc from callee's return_pc
        if possible (so that PC_IN_CALL_DUMMY will work).
 
+>>>>>>> 1.2696
 2002-05-22  Corinna Vinschen  <vinschen@redhat.com>
 
        * MAINTAINERS: Remove status `OBSOLETE' from v850.
        * config/sparc/tm-nbsd.h: Don't include config/tm-nbsd.h.
        * config/sparc/tm-nbsdaout.h: New file.
 
+>>>>>>> 1.2687
 2002-05-21  Jason Thorpe  <thorpej@wasabisystems.com>
 
        * Makefile.in (ALLDEPFILES): Add mipsnbsd-nat.c and
 
        * h8300-tdep.c: Fix formatting.
 
+>>>>>>> 1.2680
 2002-05-20  Elena Zannoni  <ezannoni@redhat.com>
 
        * rs6000-tdep.c (rs6000_do_registers_info): Simplify code for
        printing vector registers.
 
+>>>>>>> 1.2675
 2002-05-19  Andrew Cagney  <ac131313@redhat.com>
 
        From Fernando Nasser:
        * h8300-tdep.c: Add support of EXR register
        * config/h8300/tm-h8300.h: Ditto. 
        
+>>>>>>> 1.2674
 2002-05-17  Andrey Volkov <avolkov@transas.com>
 
        * h8300-tdep.c: Add additional CCR flags (I,UI,H,U) 
index e8ba96d10385fee485f76e07c6a451adb880c00b..0f757f5a122f70317a5d72a0cab44df30d60090e 100644 (file)
@@ -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);
index 4c2072438864fe2060cb6f698290bf7f4a84f5f7..9233bac2bb721fb076a6adf574b7b98ade17d65a 100644 (file)
@@ -963,6 +963,7 @@ extern struct type *builtin_type_v2si;
 
 /* Type for 128 bit vectors. */
 extern struct type *builtin_type_vec128;
+extern struct type *builtin_type_vec128i;
 
 /* Explicit floating-point formats.  See "floatformat.h".  */
 extern struct type *builtin_type_ieee_single_big;
index ddc461ec1510a7f9bdca6075f2504b608c3863bd..54746eeb8654a1473a551a940d98fd44b22d88ac 100644 (file)
@@ -1058,7 +1058,7 @@ i386_register_virtual_type (int regnum)
     return builtin_type_i387_ext;
 
   if (IS_SSE_REGNUM (regnum))
-    return builtin_type_v4sf;
+    return builtin_type_vec128i;
 
   return builtin_type_int;
 }