This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RFA: New builtin SIMD types



These are types that an architecture's REGISTER_VIRTUAL_TYPE macro can
use for its SIMD registers.  As the comment explains, the names are
inherited from GCC.

At present, only the x86 MMX registers use these types; I'll be
posting patches for that shortly.

1999-11-22  Jim Blandy  <jimb@cygnus.com>

	* gdbtypes.c (builtin_type_v4si, builtin_type_v8qi,
	builtin_type_v4hi, builtin_type_v2si): New SIMD types.
	(build_gdbtypes): Initialize them.
	(_initialize_gdbtypes): Gdbarch_swap them.
	* gdbtypes.h (builtin_type_v4si, builtin_type_v8qi,
	builtin_type_v4hi, builtin_type_v2si): Declare them. 

Index: gdb/gdbtypes.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtypes.c,v
retrieving revision 2.98.2.1
retrieving revision 2.98.2.4
diff -c -r2.98.2.1 -r2.98.2.4
*** gdb/gdbtypes.c	1999/10/29 22:42:44	2.98.2.1
--- gdb/gdbtypes.c	1999/11/07 14:32:34	2.98.2.4
***************
*** 66,71 ****
--- 66,75 ----
  struct type *builtin_type_uint64;
  struct type *builtin_type_bool;
  struct type *builtin_type_v4sf;
+ struct type *builtin_type_v4si;
+ struct type *builtin_type_v8qi;
+ struct type *builtin_type_v4hi;
+ struct type *builtin_type_v2si;
  
  int opaque_type_resolution = 1;
  
***************
*** 2968,2973 ****
--- 2972,2985 ----
    /* Build SIMD types.  */
    builtin_type_v4sf
      = init_simd_type ("__builtin_v4sf", builtin_type_float, "f", 4);
+   builtin_type_v4si
+     = init_simd_type ("__builtin_v4si", builtin_type_int32, "f", 4);
+   builtin_type_v8qi
+     = init_simd_type ("__builtin_v8qi", builtin_type_int8, "f", 8);
+   builtin_type_v4hi
+     = init_simd_type ("__builtin_v4hi", builtin_type_int16, "f", 4);
+   builtin_type_v2si
+     = init_simd_type ("__builtin_v2si", builtin_type_int32, "f", 2);
  }
  
  
***************
*** 3007,3011 ****
--- 3019,3027 ----
    register_gdbarch_swap (&builtin_type_int64, sizeof (struct type *), NULL);
    register_gdbarch_swap (&builtin_type_uint64, sizeof (struct type *), NULL);
    register_gdbarch_swap (&builtin_type_v4sf, sizeof (struct type *), NULL);
+   register_gdbarch_swap (&builtin_type_v4si, sizeof (struct type *), NULL);
+   register_gdbarch_swap (&builtin_type_v8qi, 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 (NULL, 0, build_gdbtypes);
  }
Index: gdb/gdbtypes.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtypes.h,v
retrieving revision 2.76.8.1
retrieving revision 2.76.8.2
diff -c -r2.76.8.1 -r2.76.8.2
*** gdb/gdbtypes.h	1999/10/29 22:42:45	2.76.8.1
--- gdb/gdbtypes.h	1999/11/07 14:32:35	2.76.8.2
***************
*** 855,861 ****
--- 855,867 ----
  extern struct type *builtin_type_uint32;
  extern struct type *builtin_type_int64;
  extern struct type *builtin_type_uint64;
+ 
+ /* SIMD types.  We inherit these names from GCC.  */
  extern struct type *builtin_type_v4sf;
+ extern struct type *builtin_type_v4si;
+ extern struct type *builtin_type_v8qi;
+ extern struct type *builtin_type_v4hi;
+ extern struct type *builtin_type_v2si;
  
  /* We use this for the '/c' print format, because builtin_type_char is
     just a one-byte integral type, which languages less laid back than

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]