From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: bauerman@br.ibm.com (Thiago Jung Bauermann)
Cc: gdb-patches@sourceware.org (gdb-patches ml)
Subject: Re: [RFA] Fix Power7 extended floating point pseudo-registers
Date: Mon, 14 Feb 2011 14:16:00 -0000 [thread overview]
Message-ID: <201102141347.p1EDlh9T008428@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <1297280713.12781.84.camel@hactar> from "Thiago Jung Bauermann" at Feb 09, 2011 05:45:13 PM
Thiago Jung Bauermann wrote:
> 2011-02-09 Thiago Jung Bauermann <bauerman@br.ibm.com>
>
> gdb/
> * rs6000-tdep.c (IS_EFP_PSEUDOREG): Use correct constant for
> the EFP register set size.
> (efpr_pseudo_register_read): Use intermediary buffer to read
> data from the VMX register.
> (efpr_pseudo_register_write): Use intermediary buffer to read
> and write data from/to the VMX register.
>
> gdb/testsuite/
> * gdb.arch/vsx-regs.exp: Add "vector_register1_vr" and
> "vector_register2_vr" test strings. Test the extended floating
> point registers (F32~F63).
> * lib/gdb.exp (skip_vsx_tests): Update compile flags for the
> IBM XL C compiler. Make the test program use a register provided
> by the compiler for the lxvd2x instruction.
This looks good to me, except:
> @@ -2720,10 +2720,12 @@ efpr_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
> {
> struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
> int reg_index = reg_nr - tdep->ppc_efpr0_regnum;
> + int vr_reg_nr = tdep->ppc_vr0_regnum + reg_index;
> + gdb_byte vr_reg_buf[MAX_REGISTER_SIZE];
>
> - /* Read the portion that overlaps the VMX registers. */
> - regcache_raw_read (regcache, tdep->ppc_vr0_regnum +
> - reg_index, buffer);
> + /* Read the portion that overlaps the VMX register. */
> + regcache_raw_read (regcache, vr_reg_nr, vr_reg_buf);
> + memcpy (buffer, vr_reg_buf, register_size (gdbarch, reg_nr));
> }
This just re-implements regcache_raw_read_part, doesn't it? You should
be just using that routine instead (and likewise for _write).
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2011-02-14 13:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-09 19:45 Thiago Jung Bauermann
2011-02-14 14:16 ` Ulrich Weigand [this message]
2011-02-15 3:50 ` Thiago Jung Bauermann
2011-02-15 13:22 ` Ulrich Weigand
2011-02-15 13:38 ` Thiago Jung Bauermann
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=201102141347.p1EDlh9T008428@d06av02.portsmouth.uk.ibm.com \
--to=uweigand@de.ibm.com \
--cc=bauerman@br.ibm.com \
--cc=gdb-patches@sourceware.org \
/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