This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [testsuite/alpha] Add test for step over fbne instruction
- From: Richard Henderson <rth at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at gcc dot gnu dot org
- Date: Wed, 25 May 2005 20:11:28 -0700
- Subject: Re: [testsuite/alpha] Add test for step over fbne instruction
- References: <20050525064819.GA5406@redhat.com> <20050526023539.GL1525@adacore.com>
On Thu, May 26, 2005 at 12:35:39PM +1000, Joel Brobecker wrote:
> " cpys $f31,$f31,$f0\n"
> " fbgt $f16,$gt_1\n" /* stop at this instruction. */
> " cpysn $f16,$f16,$f0\n"
> "$gt_1:\n"
> " ret $31,($26),1\n"
Hmm, now that I think about it, one potential problem with this form
is that we're not correctly testing for branch taken. The scenerio
is that we expect taken, set the bp on the ret, the branch *isn't*
taken, but we fall through to the ret anyway.
We'd do better to write this
" fbgt $f16,$gt_1\n" /* stop at this instruction. */
" cpysn $f16,$f16,$f0\n"
" ret $31,($26),1\n"
"$gt_1:\n"
" ret $31,($26),1\n"
so that if we choose wrong, we will in fact lose control.
r~