From: Thiago Jung Bauermann <bauerman@br.ibm.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [rfc] add ppc testcase to test fpscr
Date: Tue, 02 Sep 2008 23:35:00 -0000 [thread overview]
Message-ID: <1220398310.4204.22.camel@localhost.localdomain> (raw)
In-Reply-To: <20080902213949.GH3774@adacore.com>
El mar, 02-09-2008 a las 23:39 +0200, Joel Brobecker escribió:
> I didn't see anyone actually review the patch so I took a look.
Thanks!
> Looks OK to me, but I'm really wonderng why you added a '\r' at
> the end of the expected output in our gdb_test calls.
That was the closest I could think of to an EOL marker. Using '$' is not
an option, I believe.
> For instance:
>
> > +gdb_test "print \$fpscr" " = 0\r" "FPSCR is all zeroes"
>
> Usually, I just do:
>
> gdb_test "print \$fpscr" " = 0" "FPSCR is all zeroes"
>
> Is there something specific that you are trying to do with the '\r'?
In the instance you show I agree it's not very useful, but here:
> > +gdb_test "print/t \$fpscr" " = 10100000001000010001000000000000\r" "FPSCR for invalid operation"
I want to be sure I am testing the lower 32-bits of the FPSCR. For the
moment, this is meaningless since the FPSCR is assumed to always be 32
bits wide in GDB (also, the " = " in the beginning of the pattern
doesn't help). But the FPSCR is actually 64 bits wide starting with
Power ISA 2.05 (only Power6 at the moment). That's what I'm playing with
which prompted me to write this testcase, actually.
> > +#include <stdio.h>
>
> Is the use of stdio necessary in this case. If you can do without,
> then this would allow us to run this testcase in the bareboard case
> (powerpc-elf). Not strictly necessary, but nice to have...
I added the printf calls just to make sure GCC doesn't make the 'result'
variable vanish. Maybe that's not necessary, since the asm blocks
mention result as an output variable? Or maybe GCC would also nuke the
asm blocks instead, seeing that they serve no useful purpose if 'result'
is also not used? I don't know.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
next prev parent reply other threads:[~2008-09-02 23:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-21 23:18 Thiago Jung Bauermann
2008-08-21 23:32 ` Daniel Jacobowitz
2008-08-21 23:42 ` Thiago Jung Bauermann
2008-08-22 2:47 ` Daniel Jacobowitz
2008-08-22 18:13 ` Thiago Jung Bauermann
2008-09-02 21:40 ` Joel Brobecker
2008-09-02 23:35 ` Thiago Jung Bauermann [this message]
2008-09-02 23:46 ` Daniel Jacobowitz
2008-09-02 21:55 ` Daniel Jacobowitz
2008-09-03 20:15 ` Thiago Jung Bauermann
2008-09-03 21:01 ` Daniel Jacobowitz
2008-09-04 1:26 ` Thiago Jung Bauermann
2008-09-05 0:12 ` Joel Brobecker
2008-09-05 3:38 ` Thiago Jung Bauermann
2008-09-05 14:00 ` Joel Brobecker
2008-09-05 19: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=1220398310.4204.22.camel@localhost.localdomain \
--to=bauerman@br.ibm.com \
--cc=brobecker@adacore.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