aboutsummaryrefslogtreecommitdiff
path: root/target-alpha/translate.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-04-06 19:46:48 +0200
committerAndreas Färber <afaerber@suse.de>2012-04-15 21:26:32 +0200
commit25ebd80f1d0e4b8863968d56ccfe634ea577d365 (patch)
tree6c587655a64781adea9dca145570fabbf5b493fc /target-alpha/translate.c
parent4d0365165dd831b9f5d305a1480447dd83810a55 (diff)
downloadqemu-arm-25ebd80f1d0e4b8863968d56ccfe634ea577d365.tar.gz
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.c4
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);