From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
Cc: gdb-patches@sourceware.org, uweigand@de.ibm.com
Subject: Re: [PATCH] [PowerPC] Aliases for vector registers
Date: Fri, 11 Jan 2019 06:59:00 -0000 [thread overview]
Message-ID: <83tvifhe7d.fsf@gnu.org> (raw)
In-Reply-To: <20190110194434.842-1-pedromfc@linux.ibm.com> (message from Pedro Franco de Carvalho on Thu, 10 Jan 2019 17:44:33 -0200)
> From: Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
> Cc: uweigand@de.ibm.com
> Date: Thu, 10 Jan 2019 17:44:33 -0200
>
> This patch defines pseudo-registers "v0" through "v31" as aliases that
> map to the corresponding raw "vr0" through "vr31" vector registers for
> Power.
>
> The motivation behind this is that although GDB defines these
> registers as "vrX", the disassembler prints them as "vX", e.g. as the
> operands in instructions such as "vaddubm v2,v1,v1". This can be
> confusing to users trying to print out the values of the operands
> while inspecting the disassembled code.
>
> The new aliases are made not to belong to any register group, to avoid
> duplicated values in "info register vector" and "info register all".
> The arch-specific rs6000_pseudo_register_reggroup_p function had
> previously been removed since the other pseudo-registers could have
> their groups inferred by their type. It restored with this patch to
> handle the aliases. Membership for the other pseudo-registers is
> still determined using the default function.
>
> A new tests checks that GDB prints the expected values of vector
> registers after they are filled by the inferior, by using both the raw
> names and the aliases. Two other existing tests are modified to also
> test the aliases.
>
> gdb/ChangeLog:
> 2019-01-10 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
>
> * ppc-tdep.h (struct gdbarch_tdep) <ppc_v0_alias_regnum>: New
> field.
> * rs6000-tdep.c: Include reggroups.h.
> (IS_V_ALIAS_PSEUDOREG): Define.
> (rs6000_register_name): Return names for the "vX" aliases.
> (rs6000_pseudo_register_type): Return type for the "vX" aliases.
> (rs6000_pseudo_register_reggroup_p): Restore. Handle "vX"
> aliases. Call default_register_reggroup_p for all other
> pseudo-registers.
> (v_alias_pseudo_register_read, v_alias_pseudo_register_write):
> New functions.
> (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
> Handle "vX" aliases.
> (v_alias_pseudo_register_collect): New function.
> (rs6000_ax_pseudo_register_collect): Handle "vX" aliases.
> (rs6000_gdbarch_init): Initialize "vX" aliases as
> pseudo-registers. Restore registration of
> rs6000_pseudo_register_reggroup_p with
> set_tdesc_pseudo_register_reggroup_p.
>
> gdb/testsuite/ChangeLog:
> 2019-01-10 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
>
> * gdb.arch/vsx-regs.exp: Add tests that use the vector register
> aliases.
> * gdb.arch/altivec-regs.exp: Likewise. Fix indentation of two
> tests.
> * gdb.arch/powerpc-vector-regs.c: New file.
> * gdb.arch/powerpc-vector-regs.exp: New file.
>
> gdb/doc/ChangeLog:
> 2019-01-10 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
>
> * gdb.texinfo (PowerPC Features): Document the alias
> pseudo-registers for the org.gnu.gdb.power.altivec feature.
The gdb.texinfo part is approved.
Thanks.
next prev parent reply other threads:[~2019-01-11 6:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-10 19:49 Pedro Franco de Carvalho
2019-01-10 19:45 ` [PATCH] [PowerPC] Fix "info vector" test in gdb.arch/altivec-regs.exp Pedro Franco de Carvalho
2019-01-14 14:02 ` Ulrich Weigand
2019-01-14 14:17 ` Andreas Schwab
2019-01-14 19:36 ` Pedro Franco de Carvalho
2019-01-11 6:59 ` Eli Zaretskii [this message]
2019-01-11 18:01 ` [PATCH] [PowerPC] Aliases for vector registers Pedro Franco de Carvalho
2019-01-14 14:03 ` Ulrich Weigand
2019-01-14 19:36 ` Pedro Franco de Carvalho
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=83tvifhe7d.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=pedromfc@linux.ibm.com \
--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