diff options
| author | Richard Henderson | 2021-06-20 20:39:52 +0200 |
|---|---|---|
| committer | Richard Henderson | 2021-06-29 19:04:56 +0200 |
| commit | 06188c8981ca5d5386e22c82d5bd40e5f27c8492 (patch) | |
| tree | 7c9eced19279a1ffac82fd76576a5bb63adb6797 /target/cris | |
| parent | target/cris: Mark exceptions as DISAS_NORETURN (diff) | |
| download | qemu-06188c8981ca5d5386e22c82d5bd40e5f27c8492.tar.gz qemu-06188c8981ca5d5386e22c82d5bd40e5f27c8492.tar.xz qemu-06188c8981ca5d5386e22c82d5bd40e5f27c8492.zip | |
target/cris: Fix use_goto_tb
Do not skip the page check for user-only -- mmap/mprotect can
still change page mappings. Only check dc->base.pc_first, not
dc->ppc -- the start page is the only one that's relevant.
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/cris')
| -rw-r--r-- | target/cris/translate.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/target/cris/translate.c b/target/cris/translate.c index 24dbae6d58..9e1f2f9239 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -524,14 +524,9 @@ static void t_gen_cc_jmp(TCGv pc_true, TCGv pc_false) gen_set_label(l1); } -static inline bool use_goto_tb(DisasContext *dc, target_ulong dest) +static bool use_goto_tb(DisasContext *dc, target_ulong dest) { -#ifndef CONFIG_USER_ONLY - return (dc->base.pc_first & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK) || - (dc->ppc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); -#else - return true; -#endif + return ((dest ^ dc->base.pc_first) & TARGET_PAGE_MASK) == 0; } static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) |
