summaryrefslogtreecommitdiffstats
path: root/target/hppa
diff options
context:
space:
mode:
authorRichard Henderson2019-03-08 19:49:57 +0100
committerRichard Henderson2019-03-12 17:13:43 +0100
commitf3b423ec6ee4123fedbb74db517262dd14fa4d73 (patch)
treea28f8fc503772c42cbc117d9e69b91adf3bc5a08 /target/hppa
parentMerge remote-tracking branch 'remotes/awilliam/tags/vfio-updates-20190311.0' ... (diff)
downloadqemu-f3b423ec6ee4123fedbb74db517262dd14fa4d73.tar.gz
qemu-f3b423ec6ee4123fedbb74db517262dd14fa4d73.tar.xz
qemu-f3b423ec6ee4123fedbb74db517262dd14fa4d73.zip
target/hppa: Check for page crossings in use_goto_tb
We got away with eliding this check when target/hppa was user-only, but missed adding this check when adding system support. Fixes an early crash in the HP-UX 11 installer. Reported-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/hppa')
-rw-r--r--target/hppa/translate.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index dc5636fe94..6c815e05c2 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -816,12 +816,10 @@ static bool gen_illegal(DisasContext *ctx)
static bool use_goto_tb(DisasContext *ctx, target_ureg dest)
{
- /* Suppress goto_tb in the case of single-steping and IO. */
- if ((tb_cflags(ctx->base.tb) & CF_LAST_IO)
- || ctx->base.singlestep_enabled) {
- return false;
- }
- return true;
+ /* Suppress goto_tb for page crossing, IO, or single-steping. */
+ return !(((ctx->base.pc_first ^ dest) & TARGET_PAGE_MASK)
+ || (tb_cflags(ctx->base.tb) & CF_LAST_IO)
+ || ctx->base.singlestep_enabled);
}
/* If the next insn is to be nullified, and it's on the same page,