* [RFA] Implement Cell BE SPU-specific vector type
@ 2006-12-13 13:39 Markus Deuling
2006-12-13 13:52 ` Ulrich Weigand
2006-12-13 14:19 ` Ulrich Weigand
0 siblings, 2 replies; 5+ messages in thread
From: Markus Deuling @ 2006-12-13 13:39 UTC (permalink / raw)
To: GDB Patches; +Cc: Ulrich Weigand
Hello,
there were problems with whitespaces in the last patch I posted, so here
it is again.
I reworked the patch that adds a SPU-specific vector type to spu-tdep.c
(the order of the union fields is changed).
Ok to apply ?
ChangeLog:
* 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.
=======================================
diff -urN src/gdb/spu-tdep.c dev/gdb/spu-tdep.c
--- src/gdb/spu-tdep.c 2006-11-22 14:49:53.000000000 +0100
+++ dev/gdb/spu-tdep.c 2006-12-12 17:05:24.000000000 +0100
@@ -45,6 +45,8 @@
#include "spu-tdep.h"
+/* SPU-specific vector type. */
+struct type *spu_builtin_type_vec128;
/* Registers. */
@@ -84,7 +86,7 @@
spu_register_type (struct gdbarch *gdbarch, int reg_nr)
{
if (reg_nr < SPU_NUM_GPRS)
- return builtin_type_vec128;
+ return spu_builtin_type_vec128;
switch (reg_nr)
{
@@ -1092,8 +1094,31 @@
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
_initialize_spu_tdep (void)
{
register_gdbarch_init (bfd_arch_spu, spu_gdbarch_init);
+
+ spu_init_vector_type ();
}
Regards,
Markus
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] Implement Cell BE SPU-specific vector type
2006-12-13 13:39 [RFA] Implement Cell BE SPU-specific vector type Markus Deuling
@ 2006-12-13 13:52 ` Ulrich Weigand
2006-12-13 14:19 ` Ulrich Weigand
1 sibling, 0 replies; 5+ messages in thread
From: Ulrich Weigand @ 2006-12-13 13:52 UTC (permalink / raw)
To: Markus Deuling; +Cc: GDB Patches
Hi Markus,
> there were problems with whitespaces in the last patch I posted, so here
> it is again.
I'm sorry, but this has exactly the same problems as last time ...
> * 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.
Otherwise the patch is OK, can you either re-send with a fixed mailer
or as attachment?
Some problems:
> @@ -84,7 +86,7 @@
> spu_register_type (struct gdbarch *gdbarch, int reg_nr)
> {
> if (reg_nr < SPU_NUM_GPRS)
> - return builtin_type_vec128;
> + return spu_builtin_type_vec128;
>
> switch (reg_nr)
> {
All context lines without - or + start out with one space too many.
> + struct type *type;
> +
> + type = init_composite_type ("__spu_builtin_type_vec128",
> TYPE_CODE_UNION);
Some lines are broken up ...
Maybe this
> Content-Type: text/plain; charset=ISO-8859-15; format=flowed
has something to do with the problem.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] Implement Cell BE SPU-specific vector type
2006-12-13 13:39 [RFA] Implement Cell BE SPU-specific vector type Markus Deuling
2006-12-13 13:52 ` Ulrich Weigand
@ 2006-12-13 14:19 ` Ulrich Weigand
1 sibling, 0 replies; 5+ messages in thread
From: Ulrich Weigand @ 2006-12-13 14:19 UTC (permalink / raw)
To: Markus Deuling; +Cc: GDB Patches
Markus Deuling wrote:
> * 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.
I've now committed a white-space fixed version of this patch.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RFA] Implement Cell BE SPU-specific vector type
@ 2006-12-12 16:13 Markus Deuling
0 siblings, 0 replies; 5+ messages in thread
From: Markus Deuling @ 2006-12-12 16:13 UTC (permalink / raw)
To: GDB Patches
Hello,
I reworked the patch that adds a SPU-specific vector type to spu-tdep.c
(the order of the union fields is changed).
Ok to apply ?
ChangeLog:
* 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.
=========================================================
diff -urN src/gdb/spu-tdep.c dev/gdb/spu-tdep.c
--- src/gdb/spu-tdep.c 2006-11-22 14:49:53.000000000 +0100
+++ dev/gdb/spu-tdep.c 2006-12-12 17:05:24.000000000 +0100
@@ -45,6 +45,8 @@
#include "spu-tdep.h"
+/* SPU-specific vector type. */
+struct type *spu_builtin_type_vec128;
/* Registers. */
@@ -84,7 +86,7 @@
spu_register_type (struct gdbarch *gdbarch, int reg_nr)
{
if (reg_nr < SPU_NUM_GPRS)
- return builtin_type_vec128;
+ return spu_builtin_type_vec128;
switch (reg_nr)
{
@@ -1092,8 +1094,31 @@
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
_initialize_spu_tdep (void)
{
register_gdbarch_init (bfd_arch_spu, spu_gdbarch_init);
+
+ spu_init_vector_type ();
}
Regards,
Markus
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RFA] Implement Cell BE SPU-specific vector type
@ 2006-12-07 11:07 Markus Deuling
0 siblings, 0 replies; 5+ messages in thread
From: Markus Deuling @ 2006-12-07 11:07 UTC (permalink / raw)
To: GDB Patches
Hello,
this patch adds a SPU-specific vector type to spu-tdep.c.
Ok to apply ?
ChangeLog:
* spu-tdep.c (spu_init_vector_type): New
Function. Implement SPU-specific vector type.
===================================================
diff -urN src/gdb/spu-tdep.c dev/gdb/spu-tdep.c
--- src/gdb/spu-tdep.c 2006-11-22 14:49:53.000000000 +0100
+++ dev/gdb/spu-tdep.c 2006-12-07 11:51:59.000000000 +0100
@@ -45,6 +45,8 @@
#include "spu-tdep.h"
+/* SPU-specific vector type. */
+struct type *spu_builtin_type_vec128;
/* Registers. */
@@ -84,7 +86,7 @@
spu_register_type (struct gdbarch *gdbarch, int reg_nr)
{
if (reg_nr < SPU_NUM_GPRS)
- return builtin_type_vec128;
+ return spu_builtin_type_vec128;
switch (reg_nr)
{
@@ -1016,6 +1018,28 @@
remove_single_step_breakpoints ();
}
+/* 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, "v2_double", builtin_type_v2_double);
+ append_composite_type_field (type, "v4_float", builtin_type_v4_float);
+ 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);
+
+ TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR;
+ TYPE_NAME (type) = "spu_builtin_type_vec128";
+ spu_builtin_type_vec128 = type;
+}
+
+
/* Set up gdbarch struct. */
@@ -1096,4 +1120,5 @@
_initialize_spu_tdep (void)
{
register_gdbarch_init (bfd_arch_spu, spu_gdbarch_init);
+ spu_init_vector_type ();
}
Regards,
Markus
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-12-13 14:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-13 13:39 [RFA] Implement Cell BE SPU-specific vector type Markus Deuling
2006-12-13 13:52 ` Ulrich Weigand
2006-12-13 14:19 ` Ulrich Weigand
-- strict thread matches above, loose matches on Subject: below --
2006-12-12 16:13 Markus Deuling
2006-12-07 11:07 Markus Deuling
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox