提交 aa7408ec 编写于 作者: A Andreas Färber

target-sh4: Move TCG initialization to SuperHCPU initfn

Add a tcg_enabled() check to suppress it for qtest.
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 2b7ac767
......@@ -73,6 +73,10 @@ static void superh_cpu_initfn(Object *obj)
cpu_exec_init(env);
env->movcal_backup_tail = &(env->movcal_backup);
if (tcg_enabled()) {
sh4_translate_init();
}
}
static const VMStateDescription vmstate_sh_cpu = {
......
......@@ -191,6 +191,7 @@ typedef struct CPUSH4State {
#include "cpu-qom.h"
void sh4_translate_init(void);
SuperHCPU *cpu_sh4_init(const char *cpu_model);
int cpu_sh4_exec(CPUSH4State * s);
int cpu_sh4_signal_handler(int host_signum, void *pinfo,
......
......@@ -71,7 +71,7 @@ static uint32_t gen_opc_hflags[OPC_BUF_SIZE];
#include "exec/gen-icount.h"
static void sh4_translate_init(void)
void sh4_translate_init(void)
{
int i;
static int done_init = 0;
......@@ -251,7 +251,6 @@ SuperHCPU *cpu_sh4_init(const char *cpu_model)
cpu = SUPERH_CPU(object_new(TYPE_SUPERH_CPU));
env = &cpu->env;
env->features = def->features;
sh4_translate_init();
env->cpu_model_str = cpu_model;
cpu_register(env, def);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册