From: Jim Blandy <jimb@codesourcery.com>
To: "Ulrich Weigand" <uweigand@de.ibm.com>
Cc: drow@false.org (Daniel Jacobowitz), gdb-patches@sourceware.org
Subject: Re: [RFA][2/5] New port: Cell BE SPU (valops.c fix)
Date: Mon, 27 Nov 2006 22:31:00 -0000 [thread overview]
Message-ID: <m3y7pwcyi3.fsf@codesourcery.com> (raw)
In-Reply-To: <200611272206.kARM6OqG013008@d12av02.megacenter.de.ibm.com> (Ulrich Weigand's message of "Mon, 27 Nov 2006 23:06:24 +0100 (CET)")
"Ulrich Weigand" <uweigand@de.ibm.com> writes:
>> It seems to me this is the problem to fix. When value_from_register
>> retrieves a char from an SPU register, and that char is occupying byte
>> three of the register, then if that value doesn't have its
>> value_offset set, that seems wrong. You're using CONVERTIBLE_P and
>> VALUE_TO_REGISTER / REGISTER_TO_VALUE to make up for that loss of
>> information; why not actually provide it?
>
> So just to make sure I understood correctly, you'd suggesting that
> I should *not* be using CONVERT_REGISTER_P for those registers?
>
> Instead, value_from_register should run into its default path,
> and at the place where it computes the offset
>
> if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
> && len < register_size (current_gdbarch, regnum))
> /* Big-endian, and we want less than full size. */
> set_value_offset (v, register_size (current_gdbarch, regnum) - len);
> else
> set_value_offset (v, 0);
>
> we add some architecture-specific way to set a different offset?
I had to think it through a bit, but yes, I think that's the way to do
it. Then, won't the non-convertible register code in value_assign do
the right read-modify-write thing without changes?
My motivation is that it seems to me that 'struct value' already has
stuff meant to handle these kinds of subregister references, but we're
not using it. If we do use it, then value_struct_elt and
value_subscript will do the right thing for us.
next prev parent reply other threads:[~2006-11-27 22:31 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-11 18:38 Ulrich Weigand
2006-11-22 14:15 ` [PING] " Ulrich Weigand
2006-11-22 14:23 ` Daniel Jacobowitz
2006-11-22 19:25 ` Jim Blandy
2006-11-22 19:28 ` Daniel Jacobowitz
2006-11-22 19:55 ` Ulrich Weigand
2006-11-22 20:30 ` Daniel Jacobowitz
2006-11-22 20:43 ` Ulrich Weigand
2006-11-22 20:57 ` Daniel Jacobowitz
2006-11-22 22:13 ` Ulrich Weigand
2006-11-22 22:48 ` Daniel Jacobowitz
2006-11-23 13:57 ` Ulrich Weigand
2006-11-23 16:16 ` Daniel Jacobowitz
2006-11-23 17:55 ` Ulrich Weigand
2006-11-23 19:59 ` Mark Kettenis
2006-11-24 2:08 ` Daniel Jacobowitz
2006-11-24 15:51 ` Ulrich Weigand
2006-11-28 14:56 ` Daniel Jacobowitz
2006-11-27 19:31 ` Jim Blandy
2006-11-27 22:06 ` Ulrich Weigand
2006-11-27 22:31 ` Jim Blandy [this message]
2006-11-27 23:23 ` Ulrich Weigand
2006-11-27 23:59 ` Jim Blandy
2006-11-28 0:01 ` Daniel Jacobowitz
2006-12-06 16:29 ` Ulrich Weigand
2006-12-06 16:43 ` Daniel Jacobowitz
2006-12-06 17:10 ` Ulrich Weigand
2006-12-06 17:12 ` Daniel Jacobowitz
2006-12-07 6:34 ` Vladimir Prus
2006-12-06 21:21 ` Jim Blandy
2006-12-06 22:02 ` Daniel Jacobowitz
2006-12-06 23:24 ` Jim Blandy
2006-12-06 23:16 ` Ulrich Weigand
2006-12-06 23:39 ` Jim Blandy
2006-12-08 15:50 ` Ulrich Weigand
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=m3y7pwcyi3.fsf@codesourcery.com \
--to=jimb@codesourcery.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.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