@@ -143,13 +143,17 @@ void rx_cpu_dump_state(CPUState *cs, FILE *f, int flags)
}
}
-static bool use_goto_tb(DisasContext *dc, target_ulong dest)
+static bool use_goto_tb(DisasContext *ctx, target_ulong dest)
{
- if (unlikely(dc->base.singlestep_enabled)) {
+ if (unlikely(ctx->base.singlestep_enabled)) {
return false;
- } else {
- return true;
}
+
+#ifndef CONFIG_USER_ONLY
+ return (ctx->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK);
+#else
+ return true;
+#endif
}
static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest)
Add the page crossings check when using system mode. If this fix is not applied, a number of bugs may occasionally occur during target rx system mode emulation. Rename parameter dc of type DisasContext* to the more common name ctx, to keep consistency with other targets. Signed-off-by: Ahmed Karaman <ahmedkhaledkaraman@gmail.com> --- target/rx/translate.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)