[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 19/26] target/s390: Use tcg_gen_lookup_and_goto_ptr
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PULL 19/26] target/s390: Use tcg_gen_lookup_and_goto_ptr |
Date: |
Mon, 5 Jun 2017 09:52:26 -0700 |
Tested-by: Aurelien Jarno <address@hidden>
Reviewed-by: Aurelien Jarno <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
target/s390x/translate.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index 4c48c59..628fb86 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -608,11 +608,16 @@ static void gen_op_calc_cc(DisasContext *s)
set_cc_static(s);
}
-static int use_goto_tb(DisasContext *s, uint64_t dest)
+static bool use_exit_tb(DisasContext *s)
{
- if (unlikely(s->singlestep_enabled) ||
- (s->tb->cflags & CF_LAST_IO) ||
- (s->tb->flags & FLAG_MASK_PER)) {
+ return (s->singlestep_enabled ||
+ (s->tb->cflags & CF_LAST_IO) ||
+ (s->tb->flags & FLAG_MASK_PER));
+}
+
+static bool use_goto_tb(DisasContext *s, uint64_t dest)
+{
+ if (unlikely(use_exit_tb(s))) {
return false;
}
#ifndef CONFIG_USER_ONLY
@@ -5461,8 +5466,10 @@ void gen_intermediate_code(CPUS390XState *env, struct
TranslationBlock *tb)
/* Exit the TB, either by raising a debug exception or by return. */
if (do_debug) {
gen_exception(EXCP_DEBUG);
- } else {
+ } else if (use_exit_tb(&dc)) {
tcg_gen_exit_tb(0);
+ } else {
+ tcg_gen_lookup_and_goto_ptr(psw_addr);
}
break;
default:
--
2.9.4
- [Qemu-devel] [PULL 10/26] target/i386: optimize indirect branches, (continued)
- [Qemu-devel] [PULL 10/26] target/i386: optimize indirect branches, Richard Henderson, 2017/06/05
- [Qemu-devel] [PULL 12/26] tcg/ppc: Implement goto_ptr, Richard Henderson, 2017/06/05
- [Qemu-devel] [PULL 14/26] tcg/sparc: Implement goto_ptr, Richard Henderson, 2017/06/05
- [Qemu-devel] [PULL 13/26] tcg/aarch64: Implement goto_ptr, Richard Henderson, 2017/06/05
- [Qemu-devel] [PULL 11/26] tb-hash: improve tb_jmp_cache hash function in user mode, Richard Henderson, 2017/06/05
- [Qemu-devel] [PULL 15/26] tcg/s390: Implement goto_ptr, Richard Henderson, 2017/06/05
- [Qemu-devel] [PULL 17/26] tcg/arm: Implement goto_ptr, Richard Henderson, 2017/06/05
- [Qemu-devel] [PULL 20/26] target/hppa: Use tcg_gen_lookup_and_goto_ptr, Richard Henderson, 2017/06/05
- [Qemu-devel] [PULL 21/26] target/aarch64: optimize cross-page direct jumps in softmmu, Richard Henderson, 2017/06/05
- [Qemu-devel] [PULL 16/26] tcg/arm: Clarify tcg_out_bx for arm4 host, Richard Henderson, 2017/06/05
- [Qemu-devel] [PULL 19/26] target/s390: Use tcg_gen_lookup_and_goto_ptr,
Richard Henderson <=
- [Qemu-devel] [PULL 23/26] target/mips: optimize cross-page direct jumps in softmmu, Richard Henderson, 2017/06/05
- [Qemu-devel] [PULL 24/26] target/mips: optimize indirect branches, Richard Henderson, 2017/06/05
- [Qemu-devel] [PULL 22/26] target/aarch64: optimize indirect branches, Richard Henderson, 2017/06/05
- Re: [Qemu-devel] [PULL 22/26] target/aarch64: optimize indirect branches, Richard Henderson, 2017/06/07