tci: do not use CPUArchState in tcg-target.h
PATCH 1/1 tci: do not use CPUArchState in tcg-target.h
tcg-target.h does not use any QEMU-specific symbols, save for tci's usage of CPUArchState. Pull that up to tcg/tcg.h.
This will make it possible to include tcg-target.h in cpu-defs.h.
--- tcg/tcg.h | 4 +++- tcg/tci/tcg-target.h | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-)
tcg/tcg.h +3 -1
@@ -876,7 +876,9 @@ static inline size_t tcg_current_code_size(TCGContext *s)#define TB_EXIT_ICOUNT_EXPIRED 2#define TB_EXIT_REQUESTED 3 -#if !defined(tcg_qemu_tb_exec) +#ifdef HAVE_TCG_QEMU_TB_EXEC +uintptr_t tcg_qemu_tb_exec (CPUArchState *env,uint8_t *tb_ptr); +#else # define tcg_qemu_tb_exec (env, tb_ptr) \ ((uintptr_t (*)(void *, void *))tcg_ctx.code_gen_prologue)(env, tb_ptr)#endif
tcg/tci/tcg-target.h +1 -2
@@ -175,8 +175,7 @@ typedef enum {void tci_disas (uint8_t opc); -uintptr_t tcg_qemu_tb_exec (CPUArchState *env,uint8_t *tb_ptr); -#define tcg_qemu_tb_exec tcg_qemu_tb_exec +#define HAVE_TCG_QEMU_TB_EXEC static inline void flush_icache_range (uintptr_t start,uintptr_t stop) {
Signature · 1 line
2.4.0
Quoted 2 lines · Paolo Bonzini
tcg-target.hdoes not use any QEMU-specific symbols, save for tci's usage of CPUArchState. Pull that up totcg/tcg.h.
Quoted 1 line
This will make it possible to include
tcg-target.hincpu-defs.h.
Why?
r~
Quoted 9 lines · Richard Henderson
Quoted 2 lines · Paolo Bonzini
tcg-target.hdoes not use any QEMU-specific symbols, save for tci's usage of CPUArchState. Pull that up totcg/tcg.h.Reviewed-by Richard Henderson <[email protected]>Quoted 1 line
This will make it possible to include
tcg-target.hincpu-defs.h.Why?
For TCG_TARGET_DISPLACEMENT_BITS. The patch to use it in cpu-defs.h broke TCI.
Alex, can you queue this patch too with Richard's R-b?
Paolo
Quoted 9 lines · Paolo Bonzini
Quoted 6 lines · Richard Henderson
Quoted 2 lines · Paolo Bonzini
tcg-target.hdoes not use any QEMU-specific symbols, save for tci's usage of CPUArchState. Pull that up totcg/tcg.h.Reviewed-by Richard Henderson <[email protected]>
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
This will make it possible to include
tcg-target.hincpu-defs.h.Why?
For
TCG_TARGET_DISPLACEMENT_BITS. The patch to use it incpu-defs.hbroke TCI.Alex, can you queue this patch too with Richard's R-b?
Sure. Thanks, applied to ppc-next.
Alex