mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
target-cris: QOM'ify CPU
Embed CPUCRISState as first member of QOM CRISCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
092dfc7714
commit
e739a48e58
5 changed files with 136 additions and 1 deletions
|
@ -3505,11 +3505,13 @@ static uint32_t vr_by_name(const char *name)
|
|||
|
||||
CPUCRISState *cpu_cris_init (const char *cpu_model)
|
||||
{
|
||||
CRISCPU *cpu;
|
||||
CPUCRISState *env;
|
||||
static int tcg_initialized = 0;
|
||||
int i;
|
||||
|
||||
env = g_malloc0(sizeof(CPUCRISState));
|
||||
cpu = CRIS_CPU(object_new(TYPE_CRIS_CPU));
|
||||
env = &cpu->env;
|
||||
|
||||
env->pregs[PR_VR] = vr_by_name(cpu_model);
|
||||
cpu_exec_init(env);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue