summaryrefslogtreecommitdiffstats
path: root/include/exec
diff options
context:
space:
mode:
authorRichard Henderson2014-05-14 23:14:51 +0200
committerRichard Henderson2014-05-15 18:22:32 +0200
commita10c64e0df3acbefdee1b2b837f76f05b0231aae (patch)
tree70457e5526c7d69abcd52ff6873d1c47bf666df8 /include/exec
parenttcg-s390: Don't force -march=z990 (diff)
downloadqemu-a10c64e0df3acbefdee1b2b837f76f05b0231aae.tar.gz
qemu-a10c64e0df3acbefdee1b2b837f76f05b0231aae.tar.xz
qemu-a10c64e0df3acbefdee1b2b837f76f05b0231aae.zip
tcg-s390: Implement direct chaining of TBs
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/exec-all.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 444b4d9a1d..8bc2eb663e 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -131,6 +131,7 @@ static inline void tlb_flush(CPUState *cpu, int flush_global)
#if defined(__arm__) || defined(_ARCH_PPC) \
|| defined(__x86_64__) || defined(__i386__) \
|| defined(__sparc__) || defined(__aarch64__) \
+ || defined(__s390x__) \
|| defined(CONFIG_TCG_INTERPRETER)
#define USE_DIRECT_JUMP
#endif
@@ -232,6 +233,14 @@ static inline void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr)
stl_le_p((void*)jmp_addr, addr - (jmp_addr + 4));
/* no need to flush icache explicitly */
}
+#elif defined(__s390x__)
+static inline void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr)
+{
+ /* patch the branch destination */
+ intptr_t disp = addr - (jmp_addr - 2);
+ stl_be_p((void*)jmp_addr, disp / 2);
+ /* no need to flush icache explicitly */
+}
#elif defined(__aarch64__)
void aarch64_tb_set_jmp_target(uintptr_t jmp_addr, uintptr_t addr);
#define tb_set_jmp_target1 aarch64_tb_set_jmp_target