Add uc_ctl_get/set_tcg_buffer_size
This commit is contained in:
@@ -1085,6 +1085,7 @@ static inline void code_gen_alloc(struct uc_struct *uc, size_t tb_size)
|
||||
tcg_ctx->code_gen_buffer = alloc_code_gen_buffer(uc);
|
||||
tcg_ctx->initial_buffer = tcg_ctx->code_gen_buffer;
|
||||
tcg_ctx->initial_buffer_size = tcg_ctx->code_gen_buffer_size;
|
||||
uc->tcg_buffer_size = tcg_ctx->initial_buffer_size;
|
||||
if (tcg_ctx->code_gen_buffer == NULL) {
|
||||
fprintf(stderr, "Could not allocate dynamic translator buffer\n");
|
||||
exit(1);
|
||||
|
||||
@@ -50,7 +50,7 @@ int machine_initialize(struct uc_struct *uc)
|
||||
uc->target_page(uc);
|
||||
|
||||
/* Init tcg. use DEFAULT_CODE_GEN_BUFFER_SIZE. */
|
||||
uc->tcg_exec_init(uc, 0);
|
||||
uc->tcg_exec_init(uc, uc->tcg_buffer_size);
|
||||
|
||||
/* Init cpu. use default cpu_model. */
|
||||
return uc->cpus_init(uc, NULL);
|
||||
|
||||
Reference in New Issue
Block a user