This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]