From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: RFA: Add support for Linux native on the PowerPC E500
Date: Mon, 07 Jun 2004 17:19:00 -0000 [thread overview]
Message-ID: <20040607101933.4b4841c9@saguaro> (raw)
In-Reply-To: <vt2fz9ajzpd.fsf@zenia.home>
On 05 Jun 2004 01:17:34 -0500
Jim Blandy <jimb@redhat.com> wrote:
> 2004-06-02 Jim Blandy <jimb@redhat.com>
>
> Add native Linux support for the PowerPC E500.
> * ppc-tdep.h (struct gdbarch_tdep): New member: 'ppc_gprs_pseudo_p'.
> * rs6000-tdep.c (rs6000_gdbarch_init): Initialize it to false on
> all architectures except the E500.
> * ppc-linux-nat.c: (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): New
> #definitions.
> (struct gdb_evrregset_t): New type.
> (have_ptrace_getsetevrregs): New variable.
> (get_spe_registers, read_spliced_spe_reg, fetch_spe_register,
> fetch_spe_registers): New functions.
> (fetch_register): Call fetch_spe_register as appropriate.
> Assert that we're only passed raw register numbers.
> (fetch_ppc_registers): Call fetch_spe_registers as appropriate.
> Don't fetch gprs if they're pseudoregisters.
> (set_spe_registers, write_spliced_spe_reg, store_spe_register,
> store_spe_registers): New functions.
> (store_register): Call store_spe_register as appropriate.
> Assert that we're only passed raw register numbers.
> (store_ppc_registers): Call store_spe_registers as appropriate.
> Don't store gprs if they're pseudoregisters.
Okay, except for:
> *************** store_register (int tid, int regno)
> *** 413,423 ****
> --- 764,784 ----
> size_t bytes_to_transfer;
> char buf[MAX_REGISTER_SIZE];
>
> + /* Sanity check: this function should only be called to store raw
> + registers' values, never pseudoregisters' values. */
> + if (tdep->ppc_gp0_regnum <= regno
> + && regno < tdep->ppc_gp0_regnum + ppc_num_gprs)
> + gdb_assert (! tdep->ppc_gprs_pseudo_p);
> +
> if (altivec_register_p (regno))
> {
> store_altivec_register (tid, regno);
> return;
> }
> + else if (spe_register_p (regno))
> + {
> + store_spe_register (tid, regno);
> + }
Is an early `return' needed after the call to store_spe_register()?
(I noticed that the altivec case does this. Also, the corresponding
code in fetch_register() does this.)
Kevin
next prev parent reply other threads:[~2004-06-07 17:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-05 6:17 Jim Blandy
2004-06-07 17:19 ` Kevin Buettner [this message]
2004-06-07 23:38 ` 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=20040607101933.4b4841c9@saguaro \
--to=kevinb@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