summaryrefslogtreecommitdiffstats
path: root/tcg/tcg.c
diff options
context:
space:
mode:
authorRichard Henderson2021-03-10 00:24:33 +0100
committerRichard Henderson2021-06-11 18:26:28 +0200
commita76aabd37b5d9ddfff2de837ddef91768aa26e3e (patch)
tree38f779677d0ed4a335509165f0f8f14e1e1d446e /tcg/tcg.c
parentaccel/tcg: Rename tcg_init to tcg_init_machine (diff)
downloadqemu-a76aabd37b5d9ddfff2de837ddef91768aa26e3e.tar.gz
qemu-a76aabd37b5d9ddfff2de837ddef91768aa26e3e.tar.xz
qemu-a76aabd37b5d9ddfff2de837ddef91768aa26e3e.zip
tcg: Create tcg_init
Perform both tcg_context_init and tcg_region_init. Do not leave this split to the caller. Reviewed-by: Luis Pires <luis.pires@eldorado.org.br> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 8c43c0f316..2625d9e502 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -576,8 +576,9 @@ static void process_op_defs(TCGContext *s);
static TCGTemp *tcg_global_reg_new_internal(TCGContext *s, TCGType type,
TCGReg reg, const char *name);
-void tcg_context_init(TCGContext *s)
+static void tcg_context_init(void)
{
+ TCGContext *s = &tcg_init_ctx;
int op, total_args, n, i;
TCGOpDef *def;
TCGArgConstraint *args_ct;
@@ -654,6 +655,12 @@ void tcg_context_init(TCGContext *s)
cpu_env = temp_tcgv_ptr(ts);
}
+void tcg_init(size_t tb_size, int splitwx)
+{
+ tcg_context_init();
+ tcg_region_init(tb_size, splitwx);
+}
+
/*
* Allocate TBs right before their corresponding translated code, making
* sure that TBs and code are on different cache lines.