diff options
author | Andreas Färber <afaerber@suse.de> | 2012-04-11 23:12:05 +0200 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2012-04-24 16:04:56 +0200 |
commit | e739a48e58c41fc0d3caa24103abef9988c77cdf (patch) | |
tree | e4da9051b0f07bc556362b5e3aeecac33089fe8b /target-cris/translate.c | |
parent | 092dfc7714ad7983aeb0cada5d5983e9fde8d84c (diff) | |
download | qemu-e739a48e58c41fc0d3caa24103abef9988c77cdf.zip qemu-e739a48e58c41fc0d3caa24103abef9988c77cdf.tar.gz qemu-e739a48e58c41fc0d3caa24103abef9988c77cdf.tar.bz2 |
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>
Diffstat (limited to 'target-cris/translate.c')
-rw-r--r-- | target-cris/translate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target-cris/translate.c b/target-cris/translate.c index 7224f46..26c3f0b 100644 --- a/target-cris/translate.c +++ b/target-cris/translate.c @@ -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); |