[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] target/hppa: Check page crossings in use_goto_tb() only in s
From: |
Ahmed Karaman |
Subject: |
[PATCH 1/2] target/hppa: Check page crossings in use_goto_tb() only in system mode |
Date: |
Tue, 19 May 2020 18:21:43 +0200 |
Restrict page crossing check to system mode only. By doing this, the
hppa target performance in user mode improves by up to 6.93%. Of course,
the amount of performance improvement will vary depending on the nature
of the hppa executable being emulated by QEMU.
While doing this correction, this patch adds some more verbose
comments in use_goto_tb() as well.
Signed-off-by: Ahmed Karaman <address@hidden>
---
target/hppa/translate.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 52d7bea1ea..7c9180cd76 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -817,10 +817,20 @@ static bool gen_illegal(DisasContext *ctx)
static bool use_goto_tb(DisasContext *ctx, target_ureg dest)
{
- /* 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);
+ /* No direct translation block linking with CF_LAST_IO or in singlestep */
+ if ((tb_cflags(ctx->base.tb) & CF_LAST_IO) ||
+ ctx->base.singlestep_enabled) {
+ return false;
+ }
+
+#ifndef CONFIG_USER_ONLY
+ /* Directly link translation blocks only from inside the same guest page */
+ if ((ctx->base.pc_first ^ dest) & TARGET_PAGE_MASK) {
+ return false;
+ }
+#endif
+
+ return true;
}
/* If the next insn is to be nullified, and it's on the same page,
--
2.17.1
- [PATCH 0/2] Update use_goto_tb() in hppa and rx targets, Ahmed Karaman, 2020/05/19
- [PATCH 2/2] target/rx: Check for page crossings in use_goto_tb(), Ahmed Karaman, 2020/05/19
- [PATCH 1/2] target/hppa: Check page crossings in use_goto_tb() only in system mode,
Ahmed Karaman <=
- Re: [PATCH 0/2] Update use_goto_tb() in hppa and rx targets, Richard Henderson, 2020/05/19
- Re: [PATCH 0/2] Update use_goto_tb() in hppa and rx targets, Alex Bennée, 2020/05/19
- Re: [PATCH 0/2] Update use_goto_tb() in hppa and rx targets, Ahmed Karaman, 2020/05/21
- Re: [PATCH 0/2] Update use_goto_tb() in hppa and rx targets, Richard Henderson, 2020/05/21
- Re: [PATCH 0/2] Update use_goto_tb() in hppa and rx targets, Aleksandar Markovic, 2020/05/25
- Re: [PATCH 0/2] Update use_goto_tb() in hppa and rx targets, Aleksandar Markovic, 2020/05/26
- Re: [PATCH 0/2] Update use_goto_tb() in hppa and rx targets, Ahmed Karaman, 2020/05/26
- Re: [PATCH 0/2] Update use_goto_tb() in hppa and rx targets, Aleksandar Markovic, 2020/05/26
- Re: [PATCH 0/2] Update use_goto_tb() in hppa and rx targets, Aleksandar Markovic, 2020/05/26