From: Jim Blandy <jimb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: RFC: Add 'double' member to 64-bit vector register type
Date: Sat, 19 Mar 2005 06:17:00 -0000 [thread overview]
Message-ID: <vt2is3omadg.fsf@zenia.home> (raw)
gdb/ChangeLog:
2005-03-17 Jim Blandy <jimb@redhat.com>
* gdbtypes.c (build_builtin_type_vec64): Include a 'double' member
in the union, too, since these registers can hold 64-bit floating
point types.
gdb/testsuite/ChangeLog:
2005-03-17 Jim Blandy <jimb@redhat.com>
* gdb.arch/e500-regs.exp: Expect to see 'dbl' members in ev
registers.
Index: gdb/gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.99
diff -c -p -r1.99 gdbtypes.c
*** gdb/gdbtypes.c 24 Feb 2005 13:51:32 -0000 1.99
--- gdb/gdbtypes.c 17 Mar 2005 05:19:43 -0000
*************** build_builtin_type_vec64 (void)
*** 896,901 ****
--- 896,902 ----
union __gdb_builtin_type_vec64
{
int64_t uint64;
+ double dbl;
float v2_float[2];
int32_t v2_int32[2];
int16_t v4_int16[4];
*************** build_builtin_type_vec64 (void)
*** 907,912 ****
--- 908,914 ----
t = init_composite_type ("__gdb_builtin_type_vec64", TYPE_CODE_UNION);
append_composite_type_field (t, "uint64", builtin_type_int64);
+ append_composite_type_field (t, "dbl", builtin_type_double);
append_composite_type_field (t, "v2_float", builtin_type_v2_float);
append_composite_type_field (t, "v2_int32", builtin_type_v2_int32);
append_composite_type_field (t, "v4_int16", builtin_type_v4_int16);
Index: gdb/testsuite/gdb.arch/e500-regs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/e500-regs.exp,v
retrieving revision 1.2
diff -c -p -r1.2 e500-regs.exp
*** gdb/testsuite/gdb.arch/e500-regs.exp 15 Jun 2004 18:12:04 -0000 1.2
--- gdb/testsuite/gdb.arch/e500-regs.exp 17 Mar 2005 05:19:47 -0000
*************** gdb_expect {
*** 85,93 ****
# b) the register read (below) also works.
if {$endianness == "big"} {
! set vector_register ".uint64 = 0x100000001, v2_float = .0x0, 0x0., v2_int32 = .0x1, 0x1., v4_int16 = .0x0, 0x1, 0x0, 0x1., v8_int8 = .0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1.."
} else {
! set vector_register ".uint64 = 0x100000001, v2_float = .0x0, 0x0., v2_int32 = .0x1, 0x1., v4_int16 = .0x1, 0x0, 0x1, 0x0., v8_int8 = .0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0.."
}
for {set i 0} {$i < 32} {incr i 1} {
--- 85,93 ----
# b) the register read (below) also works.
if {$endianness == "big"} {
! set vector_register ".uint64 = 0x100000001, dbl = 0x0, v2_float = .0x0, 0x0., v2_int32 = .0x1, 0x1., v4_int16 = .0x0, 0x1, 0x0, 0x1., v8_int8 = .0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1.."
} else {
! set vector_register ".uint64 = 0x100000001, dbl = 0x0, v2_float = .0x0, 0x0., v2_int32 = .0x1, 0x1., v4_int16 = .0x1, 0x0, 0x1, 0x0., v8_int8 = .0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0.."
}
for {set i 0} {$i < 32} {incr i 1} {
*************** for {set i 0} {$i < 32} {incr i 1} {
*** 110,118 ****
# the way gdb works.
if {$endianness == "big"} {
! set decimal_vector ".uint64 = 4294967297, v2_float = .1.*e-45, 1.*e-45., v2_int32 = .1, 1., v4_int16 = .0, 1, 0, 1., v8_int8 = ..000.000.000.001.000.000.000.001.."
} else {
! set decimal_vector ".uint64 = 4294967297, v2_float = .1.*e-45, 1.*e-45., v2_int32 = .1, 1., v4_int16 = .1, 0, 1, 0., v8_int8 = ..001.000.000.000.001.000.000.."
}
for {set i 0} {$i < 32} {incr i 1} {
--- 110,118 ----
# the way gdb works.
if {$endianness == "big"} {
! set decimal_vector ".uint64 = 4294967297, dbl = 0, v2_float = .1.*e-45, 1.*e-45., v2_int32 = .1, 1., v4_int16 = .0, 1, 0, 1., v8_int8 = ..000.000.000.001.000.000.000.001.."
} else {
! set decimal_vector ".uint64 = 4294967297, dbl = 0, v2_float = .1.*e-45, 1.*e-45., v2_int32 = .1, 1., v4_int16 = .1, 0, 1, 0., v8_int8 = ..001.000.000.000.001.000.000.."
}
for {set i 0} {$i < 32} {incr i 1} {
next reply other threads:[~2005-03-19 6:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-19 6:17 Jim Blandy [this message]
2005-03-19 15:37 ` Daniel Jacobowitz
2005-03-19 21:17 ` Jim Blandy
2005-03-20 2:33 ` Daniel Jacobowitz
2005-03-20 11:14 ` Mark Kettenis
2005-04-05 16:58 ` Jim Blandy
2005-04-06 7:09 ` Mark Kettenis
2005-04-07 5:00 ` Jim Blandy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vt2is3omadg.fsf@zenia.home \
--to=jimb@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox