diff options
author | Evgeny Voevodin <evgenyvoevodin@gmail.com> | 2013-02-01 01:47:22 +0700 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2013-02-16 10:40:56 +0000 |
commit | 0b0d3320db74cde233ee7855ad32a9c121d20eb4 (patch) | |
tree | 5a633c26c8844f711385158d78949344cd86add9 /tcg | |
parent | 2742f56d134ba0f5ed7e447afd0b6e2001ffc5c1 (diff) | |
download | qemu-0b0d3320db74cde233ee7855ad32a9c121d20eb4.zip qemu-0b0d3320db74cde233ee7855ad32a9c121d20eb4.tar.gz qemu-0b0d3320db74cde233ee7855ad32a9c121d20eb4.tar.bz2 |
TCG: Final globals clean-up
Signed-off-by: Evgeny Voevodin <evgenyvoevodin@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/tcg.c | 2 | ||||
-rw-r--r-- | tcg/tcg.h | 14 |
2 files changed, 12 insertions, 4 deletions
@@ -263,7 +263,7 @@ void tcg_context_init(TCGContext *s) void tcg_prologue_init(TCGContext *s) { /* init global prologue and epilogue */ - s->code_buf = code_gen_prologue; + s->code_buf = s->code_gen_prologue; s->code_ptr = s->code_buf; tcg_target_qemu_prologue(s); flush_icache_range((tcg_target_ulong)s->code_buf, @@ -462,6 +462,15 @@ struct TCGContext { uint16_t gen_opc_icount[OPC_BUF_SIZE]; uint8_t gen_opc_instr_start[OPC_BUF_SIZE]; + /* Code generation */ + int code_gen_max_blocks; + uint8_t *code_gen_prologue; + uint8_t *code_gen_buffer; + size_t code_gen_buffer_size; + /* threshold to flush the translated code buffer */ + size_t code_gen_buffer_max_size; + uint8_t *code_gen_ptr; + #if defined(CONFIG_QEMU_LDST_OPTIMIZATION) && defined(CONFIG_SOFTMMU) /* labels info for qemu_ld/st IRs The labels help to generate TLB miss case codes at the end of TB */ @@ -658,12 +667,11 @@ TCGv_i64 tcg_const_i64(int64_t val); TCGv_i32 tcg_const_local_i32(int32_t val); TCGv_i64 tcg_const_local_i64(int64_t val); -extern uint8_t *code_gen_prologue; - /* TCG targets may use a different definition of tcg_qemu_tb_exec. */ #if !defined(tcg_qemu_tb_exec) # define tcg_qemu_tb_exec(env, tb_ptr) \ - ((tcg_target_ulong (*)(void *, void *))code_gen_prologue)(env, tb_ptr) + ((tcg_target_ulong (*)(void *, void *))tcg_ctx.code_gen_prologue)(env, \ + tb_ptr) #endif void tcg_register_jit(void *buf, size_t buf_size); |