More SSE infrastructure

Mark Kettenis kettenis@wins.uva.nl
Mon Jul 3 17:20:00 GMT 2000


   Date: Mon, 3 Jul 2000 14:02:20 -0700
   From: Richard Henderson <rth@cygnus.com>

   [ For the GDB list, we're discussing what needs to be emitted for
     debug information for 128-bit integers used with SSE.

     Note that this is not the same as when a user has declared a proper
     128-bit vector type, which is given in the debugging information as
     a struct, but rather to the Intel API defined __m128, which does not
     define the shape of the vector (float[4], int[4], short[8], ...) and
     so is represented as a plain int.  ]

Some time ago, Jim Blandy added support for SSE/SIMD to GDB[1].  We have
the following definitions in gdbtypes.h:

/* 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;

And appropriate initializations in gdbtypes.c.  The "default" type for
the SSE registers is builtin_type_v4sf (see
config/i386/tm-i386.h:REGISTER_VIRTUAL_TYPE(N)).  I don't know why
(you'd have to ask Jim, but I believe he's on vacation until July 10).
It would make some sense though to make the __m128 type similar to the
SSE registers.  If builtin_type_v4sf is indeed the most suitable
return type, that would probably mean emitting the debug information
as a struct.

Mark

[1] This work was supposed to work together with a Linux kernel patch
    developed by Cygnus.  The stuff recenty added to Linux 2.4.0test2
    is a bit different, and I'm in the process of changing GDB
    accordingly.  If people are interested I can post a (preliminary)
    patch.


More information about the Gdb mailing list