From: Joel Brobecker <brobecker@adacore.com>
To: Thiago Jung Bauermann <bauerman@br.ibm.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [rfc][1/2] add suport for 64-bit fpscr in powerpc linux native
Date: Fri, 14 Nov 2008 11:36:00 -0000 [thread overview]
Message-ID: <20081113235402.GA12802@adacore.com> (raw)
In-Reply-To: <20081113235027.GA12484@adacore.com>
[humpf, I ended up being interrupted while reviewing and forgot to write
the end of the email before sending it. Here is, hopefully, the complete
version]
I will start by saying that I don't know the various powerpc variants
very well, but your patch sat unreviewed for a long time, so I have
to trust your judgement in the way you separated the ia205 variants
from the rest. From what I can tell, this is pretty much the standard
way of doing this, so this looks fine.
> gdb/
> * ppc-linux-nat.c (ppc_register_u_addr): Add special case to return
> offset for full 64-bit slot of FPSCR when in 32-bits.
> (ppc_linux_read_description): Return target description with 64-bit
> FPSCR when inferior is running on an ISA 2.05 or later processor.
> * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Call
> initialize_tdec_powerpc_isa205_32l,
> initialize_tdec_powerpc_isa205_altivec32l,
> initialize_tdec_powerpc_isa205_vsx32l,
> initialize_tdec_powerpc_isa205_64l,
> initialize_tdec_powerpc_isa205_altivec64l and
> initialize_tdec_powerpc_isa205_vsx64l.
> * ppc-linux-tdep.h: Add external declaration for
> tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l,
> tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_64l,
> tdesc_powerpc_isa205_altivec64l and tdesc_powerpc_isa205_vsx64l.
> * features/rs600/powerpc-fpu-isa205.xml: New file.
> * features/rs600/powerpc-isa205-32l.xml: New file.
> * features/rs600/powerpc-isa205-64l.xml: New file.
> * features/rs600/powerpc-isa205-altivec32l.xml: New file.
> * features/rs600/powerpc-isa205-altivec64l.xml: New file.
> * features/rs600/powerpc-isa205-vsx32l.xml: New file.
> * features/rs600/powerpc-isa205-vsx64l.xml: New file.
> * features/rs600/powerpc-isa205-32l.c: Generate.
> * features/rs600/powerpc-isa205-64l.c: Generate.
> * features/rs600/powerpc-isa205-altivec32l.c: Generate.
> * features/rs600/powerpc-isa205-altivec64l.c: Generate.
> * features/rs600/powerpc-isa205-vsx32l.c: Generate.
> * features/rs600/powerpc-isa205-vsx64l.c: Generate.
>
> gdb/testsuite/
>
> * gdb.arch/ppc-dfp.exp: New file.
> * gdb.arch/ppc-dfp.c: New file.
> +#ifndef PPC_FEATURE_ARCH_2_05
> +#define PPC_FEATURE_ARCH_2_05 0x00001000 /* ISA 2.05 */
> +#endif
How would this macro be defined? Does it come from one of the system
includes? What does this macro contain? Perhaps a comment describing
this macro would be useful.
(a few minutes later, after I started looking at the change inside
ppc_linux_read_description, I think I get it, now...)
> + /* If the FPSCR is 64-bit wide, we need to fetch the whole 64-bit
> + slot and not just its second word. The PT_FPSCR supplied in a
> + 32-bit GDB compilation doesn't reflect this. */
32-bit GDB compilation: Do you mean a 32-bit GDB?
While you're modifying this part of the code, I noticed a typo in
a comment just above:
/* NOTE: cagney/2005-02-08: On some 64-bit GNU/Linux systems the
kernel headers incorrectly contained the 32-bit definition of
PT_FPSCR. For the 32-bit definition, floating-point
registers occupy two 32-bit "slots", and the FPSCR lives in
the secondhalf of such a slot-pair (hence +1). For 64-bit,
^^^^^^^^^^ missing space between second and half.
Thanks!
> +# Please email any bugs, comments, and/or additions to this file to:
> +# bug-gdb@prep.ai.mit.edu
Could you remove this part form your copyright header?
> +gdb_test "print/t \$fpscr" " = 10100000000000000000000000000000000" "FPSCR for round to nearest, ties toward zero rounding mode"
Just a casual remark, not a request for change, but I'm surprised
that you might find /t more useful in this case than /x ;-).
Overall, the patch looks sane to me. Can you just wait a few more days,
say until Monday to give the real experts a chance to yell at me ;-),
and then commit?
:REVIEWMAIL:
--
Joel
next prev parent reply other threads:[~2008-11-13 23:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-15 0:02 Thiago Jung Bauermann
2008-09-24 20:32 ` Thiago Jung Bauermann
2008-11-13 20:06 ` Thiago Jung Bauermann
2008-11-14 11:32 ` Joel Brobecker
2008-11-14 11:36 ` Joel Brobecker [this message]
2008-11-18 5:45 ` Thiago Jung Bauermann
2008-11-18 5:46 ` Daniel Jacobowitz
2008-11-19 13:30 ` 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=20081113235402.GA12802@adacore.com \
--to=brobecker@adacore.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