mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
tcg: Move tcg prologue pointer out of TCGContext
This value is constant across all thread-local copies of TCGContext, so we might as well move it out of thread-local storage. Use the correct function pointer type, and name the variable tcg_qemu_tb_exec, which means that we are able to remove the macro that does the casting. Replace HAVE_TCG_QEMU_TB_EXEC with CONFIG_TCG_INTERPRETER, as this is somewhat clearer in intent. Reviewed-by: Joelle van Dyne <j@getutm.app> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
664a79735e
commit
b91ccb3115
3 changed files with 14 additions and 8 deletions
|
@ -621,7 +621,6 @@ struct TCGContext {
|
|||
here, because there's too much arithmetic throughout that relies
|
||||
on addition and subtraction working on bytes. Rely on the GCC
|
||||
extension that allows arithmetic on void*. */
|
||||
void *code_gen_prologue;
|
||||
void *code_gen_epilogue;
|
||||
void *code_gen_buffer;
|
||||
size_t code_gen_buffer_size;
|
||||
|
@ -1222,11 +1221,11 @@ static inline unsigned get_mmuidx(TCGMemOpIdx oi)
|
|||
#define TB_EXIT_IDXMAX 1
|
||||
#define TB_EXIT_REQUESTED 3
|
||||
|
||||
#ifdef HAVE_TCG_QEMU_TB_EXEC
|
||||
uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr);
|
||||
#ifdef CONFIG_TCG_INTERPRETER
|
||||
uintptr_t tcg_qemu_tb_exec(CPUArchState *env, void *tb_ptr);
|
||||
#else
|
||||
# define tcg_qemu_tb_exec(env, tb_ptr) \
|
||||
((uintptr_t (*)(void *, void *))tcg_ctx->code_gen_prologue)(env, tb_ptr)
|
||||
typedef uintptr_t tcg_prologue_fn(CPUArchState *env, void *tb_ptr);
|
||||
extern tcg_prologue_fn *tcg_qemu_tb_exec;
|
||||
#endif
|
||||
|
||||
void tcg_register_jit(void *buf, size_t buf_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue