diff options
author | Andreas Färber | 2012-04-06 19:46:48 +0200 |
---|---|---|
committer | Andreas Färber | 2012-04-15 21:26:32 +0200 |
commit | 25ebd80f1d0e4b8863968d56ccfe634ea577d365 (patch) | |
tree | 6c587655a64781adea9dca145570fabbf5b493fc /target-alpha/translate.c | |
parent | Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf (diff) | |
download | qemu-25ebd80f1d0e4b8863968d56ccfe634ea577d365.tar.gz qemu-25ebd80f1d0e4b8863968d56ccfe634ea577d365.tar.xz qemu-25ebd80f1d0e4b8863968d56ccfe634ea577d365.zip |
target-alpha: QOM'ify CPU
Embed CPUAlphaState as first member of AlphaCPU.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-alpha/translate.c')
-rw-r--r-- | target-alpha/translate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 1f4565d794..f773e6cffc 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -3525,10 +3525,12 @@ static const struct cpu_def_t cpu_defs[] = { CPUAlphaState * cpu_alpha_init (const char *cpu_model) { + AlphaCPU *cpu; CPUAlphaState *env; int implver, amask, i, max; - env = g_malloc0(sizeof(CPUAlphaState)); + cpu = ALPHA_CPU(object_new(TYPE_ALPHA_CPU)); + env = &cpu->env; cpu_exec_init(env); alpha_translate_init(); tlb_flush(env, 1); |