[testsuite/alpha] Add test for step over fbne instruction

Daniel Jacobowitz drow@false.org
Thu May 26 03:41:00 GMT 2005


On Wed, May 25, 2005 at 08:11:28PM -0700, Richard Henderson wrote:
> 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.

Then the testsuite is likely to get out of sync - either way, we need
to do a little dance to recover.  Joel, how about checking to see that
the instruction we've stopped on is the correct one - how much would
that complicate the test?

-- 
Daniel Jacobowitz
CodeSourcery, LLC



More information about the Gdb-patches mailing list