mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-19 22:03:57 +08:00
2006-12-13 Markus Deuling <deuling@de.ibm.com>
* spu-tdep.c (spu_init_vector_type): New function. (spu_builtin_type_vec128.): New static variable. (spu_register_type): Return spu_builtin_type_vec128 as default. (_initialize_spu_tdep): Call spu_init_vector_type.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2006-12-13 Markus Deuling <deuling@de.ibm.com>
|
||||||
|
|
||||||
|
* spu-tdep.c (spu_init_vector_type): New function.
|
||||||
|
(spu_builtin_type_vec128.): New static variable.
|
||||||
|
(spu_register_type): Return spu_builtin_type_vec128 as default.
|
||||||
|
(_initialize_spu_tdep): Call spu_init_vector_type.
|
||||||
|
|
||||||
2006-12-09 Corinna Vinschen <vinschen@redhat.com>
|
2006-12-09 Corinna Vinschen <vinschen@redhat.com>
|
||||||
|
|
||||||
* win32-nat.c (env_sort): Remove.
|
* win32-nat.c (env_sort): Remove.
|
||||||
|
@ -45,6 +45,8 @@
|
|||||||
|
|
||||||
#include "spu-tdep.h"
|
#include "spu-tdep.h"
|
||||||
|
|
||||||
|
/* SPU-specific vector type. */
|
||||||
|
struct type *spu_builtin_type_vec128;
|
||||||
|
|
||||||
/* Registers. */
|
/* Registers. */
|
||||||
|
|
||||||
@ -84,7 +86,7 @@ static struct type *
|
|||||||
spu_register_type (struct gdbarch *gdbarch, int reg_nr)
|
spu_register_type (struct gdbarch *gdbarch, int reg_nr)
|
||||||
{
|
{
|
||||||
if (reg_nr < SPU_NUM_GPRS)
|
if (reg_nr < SPU_NUM_GPRS)
|
||||||
return builtin_type_vec128;
|
return spu_builtin_type_vec128;
|
||||||
|
|
||||||
switch (reg_nr)
|
switch (reg_nr)
|
||||||
{
|
{
|
||||||
@ -1092,8 +1094,31 @@ spu_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||||||
return gdbarch;
|
return gdbarch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Implement a SPU-specific vector type as replacement
|
||||||
|
for __gdb_builtin_type_vec128. */
|
||||||
|
static void
|
||||||
|
spu_init_vector_type (void)
|
||||||
|
{
|
||||||
|
struct type *type;
|
||||||
|
|
||||||
|
type = init_composite_type ("__spu_builtin_type_vec128", TYPE_CODE_UNION);
|
||||||
|
append_composite_type_field (type, "uint128", builtin_type_int128);
|
||||||
|
append_composite_type_field (type, "v2_int64", builtin_type_v2_int64);
|
||||||
|
append_composite_type_field (type, "v4_int32", builtin_type_v4_int32);
|
||||||
|
append_composite_type_field (type, "v8_int16", builtin_type_v8_int16);
|
||||||
|
append_composite_type_field (type, "v16_int8", builtin_type_v16_int8);
|
||||||
|
append_composite_type_field (type, "v2_double", builtin_type_v2_double);
|
||||||
|
append_composite_type_field (type, "v4_float", builtin_type_v4_float);
|
||||||
|
|
||||||
|
TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR;
|
||||||
|
TYPE_NAME (type) = "spu_builtin_type_vec128";
|
||||||
|
spu_builtin_type_vec128 = type;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_initialize_spu_tdep (void)
|
_initialize_spu_tdep (void)
|
||||||
{
|
{
|
||||||
register_gdbarch_init (bfd_arch_spu, spu_gdbarch_init);
|
register_gdbarch_init (bfd_arch_spu, spu_gdbarch_init);
|
||||||
|
|
||||||
|
spu_init_vector_type ();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user