target-sparc: Revert setting cpu_dst to gen_dest_gpr
[qemu/pbrook.git] / target-alpha / cpu.c
blob62d2a669a99a38d72fbfdabfdeee90b7a3de2cf2
1 /*
2 * QEMU Alpha CPU
4 * Copyright (c) 2007 Jocelyn Mayer
5 * Copyright (c) 2012 SUSE LINUX Products GmbH
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, see
19 * <http://www.gnu.org/licenses/lgpl-2.1.html>
22 #include "cpu-qom.h"
23 #include "qemu-common.h"
26 static void alpha_cpu_initfn(Object *obj)
28 AlphaCPU *cpu = ALPHA_CPU(obj);
29 CPUAlphaState *env = &cpu->env;
31 cpu_exec_init(env);
32 tlb_flush(env, 1);
34 #if defined(CONFIG_USER_ONLY)
35 env->ps = PS_USER_MODE;
36 cpu_alpha_store_fpcr(env, (FPCR_INVD | FPCR_DZED | FPCR_OVFD
37 | FPCR_UNFD | FPCR_INED | FPCR_DNOD
38 | FPCR_DYN_NORMAL));
39 #endif
40 env->lock_addr = -1;
41 env->fen = 1;
44 static const TypeInfo alpha_cpu_type_info = {
45 .name = TYPE_ALPHA_CPU,
46 .parent = TYPE_CPU,
47 .instance_size = sizeof(AlphaCPU),
48 .instance_init = alpha_cpu_initfn,
49 .abstract = false,
50 .class_size = sizeof(AlphaCPUClass),
53 static void alpha_cpu_register_types(void)
55 type_register_static(&alpha_cpu_type_info);
58 type_init(alpha_cpu_register_types)