[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 240ce2: target-mips: fix branch in likely del
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] 240ce2: target-mips: fix branch in likely delay slot tcg a... |
Date: |
Sun, 28 Jul 2013 10:30:07 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 240ce26a0533a6e5ee472789fbfbd9f7f939197e
https://github.com/qemu/qemu/commit/240ce26a0533a6e5ee472789fbfbd9f7f939197e
Author: James Hogan <address@hidden>
Date: 2013-07-28 (Sun, 28 Jul 2013)
Changed paths:
M target-mips/translate.c
Log Message:
-----------
target-mips: fix branch in likely delay slot tcg assert
When a branch delay slot contains another branch instruction, the code
generated raises an exception, however since is_branch==1,
handle_delay_slot() doesn't get called immediately. This means
ctx->bstate isn't set to BS_BRANCH, and the decoder continues decoding
until a non-branch instruction is found.
If the first branch was a branch likely instruction then each
instruction after it generates code for the unlikely case, to go to the
next tb starting after the delay slot. This results in multiple goto_tb
tcg ops being generated with the same exit number. When debug is enabled
this hits:
tcg-op.h:2589: tcg_gen_goto_tb: Assertion `(tcg_ctx.goto_tb_issue_mask & (1 <<
idx)) == 0' failed.
This is fixed by removing is_branch entirely, and calling
handle_delay_slot() if (ctx.hflags & MIPS_HFLAG_BMASK) was set prior to
the current instruction being decoded. This still prevents
handle_delay_slot() being called immediately after a branch but allows
it to still be called after a branch within a delay slot.
Signed-off-by: James Hogan <address@hidden>
Signed-off-by: Yongbok Kim <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>
Commit: cba5cb67becd66f8eae4177c4f95756f3f9bb77a
https://github.com/qemu/qemu/commit/cba5cb67becd66f8eae4177c4f95756f3f9bb77a
Author: Andreas Färber <address@hidden>
Date: 2013-07-28 (Sun, 28 Jul 2013)
Changed paths:
M hw/mips/mips_malta.c
Log Message:
-----------
mips_malta: QOM cast cleanup
Signed-off-by: Andreas Färber <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>
Compare: https://github.com/qemu/qemu/compare/4877866ee4fb...cba5cb67becd
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 240ce2: target-mips: fix branch in likely delay slot tcg a...,
GitHub <=