Leave out essential files
Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
This commit is contained in:
parent
8dffbc159c
commit
49ccbde2d0
@ -653,6 +653,11 @@ See sample_ctl.c for a detailed example.
|
||||
#define uc_ctl_flush_tb(uc) uc_ctl(uc, UC_CTL_WRITE(UC_CTL_TB_FLUSH, 0))
|
||||
#define uc_ctl_flush_tlb(uc) uc_ctl(uc, UC_CTL_WRITE(UC_CTL_TLB_FLUSH, 0))
|
||||
#define uc_ctl_tlb_mode(uc, mode) uc_ctl(uc, UC_CTL_WRITE(UC_CTL_TLB_TYPE, 1), (mode))
|
||||
#define uc_ctl_get_tcg_buffer_size(uc, size) \
|
||||
uc_ctl(uc, UC_CTL_READ(UC_CTL_TCG_BUFFER_SIZE, 1), (size))
|
||||
#define uc_ctl_set_tcg_buffer_size(uc, size) \
|
||||
uc_ctl(uc, UC_CTL_WRITE(UC_CTL_TCG_BUFFER_SIZE, 1), (size))
|
||||
|
||||
// Opaque storage for CPU context, used with uc_context_*()
|
||||
struct uc_context;
|
||||
typedef struct uc_context uc_context;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user