Commit e04bcc691b54cb680138e3aa6e583c82c91cfca2
1 parent
f757d6ff
Actually skip over delay slot for a non-taken branch likely.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2628 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
2 deletions
target-mips/translate.c
... | ... | @@ -1530,14 +1530,14 @@ static void gen_compute_branch (DisasContext *ctx, uint32_t opc, |
1530 | 1530 | case OPC_BLTZALL: /* 0 < 0 likely */ |
1531 | 1531 | gen_op_set_T0(ctx->pc + 8); |
1532 | 1532 | gen_op_store_T0_gpr(31); |
1533 | - gen_goto_tb(ctx, 0, ctx->pc + 4); | |
1533 | + gen_goto_tb(ctx, 0, ctx->pc + 8); | |
1534 | 1534 | return; |
1535 | 1535 | case OPC_BNEL: /* rx != rx likely */ |
1536 | 1536 | case OPC_BGTZL: /* 0 > 0 likely */ |
1537 | 1537 | case OPC_BLTZL: /* 0 < 0 likely */ |
1538 | 1538 | /* Skip the instruction in the delay slot */ |
1539 | 1539 | MIPS_DEBUG("bnever and skip"); |
1540 | - gen_goto_tb(ctx, 0, ctx->pc + 4); | |
1540 | + gen_goto_tb(ctx, 0, ctx->pc + 8); | |
1541 | 1541 | return; |
1542 | 1542 | case OPC_J: |
1543 | 1543 | ctx->hflags |= MIPS_HFLAG_B; | ... | ... |