aboutsummaryrefslogtreecommitdiff
path: root/target-mips
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>2011-01-17 23:00:08 +0100
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2011-01-18 12:32:46 +0100
commit55807224561b9ac278bb65960b6c12666fd30db9 (patch)
tree097aae5a20872b3bfd59a78038e823a706df92cd /target-mips
parente027e1f075afe36698ce55d86f01b7817707c8b6 (diff)
mips: Break TBs after mfc0_count
Break the TB after reading the count register. This makes it possible to take timer interrupts immediately after a read of a possibly expired timer. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'target-mips')
-rw-r--r--target-mips/translate.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/target-mips/translate.c b/target-mips/translate.c
index cce77be0d1..187930e3d2 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -3410,8 +3410,10 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv arg, int reg, int s
gen_helper_mfc0_count(arg);
if (use_icount) {
gen_io_end();
- ctx->bstate = BS_STOP;
}
+ /* Break the TB to be able to take timer interrupts immediately
+ after reading count. */
+ ctx->bstate = BS_STOP;
rn = "Count";
break;
/* 6,7 are implementation dependent */
@@ -4581,8 +4583,10 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv arg, int reg, int
gen_helper_mfc0_count(arg);
if (use_icount) {
gen_io_end();
- ctx->bstate = BS_STOP;
}
+ /* Break the TB to be able to take timer interrupts immediately
+ after reading count. */
+ ctx->bstate = BS_STOP;
rn = "Count";
break;
/* 6,7 are implementation dependent */