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>
23 #include "qemu-common.h"
26 static void alpha_cpu_initfn(Object
*obj
)
28 AlphaCPU
*cpu
= ALPHA_CPU(obj
);
29 CPUAlphaState
*env
= &cpu
->env
;
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
44 static const TypeInfo alpha_cpu_type_info
= {
45 .name
= TYPE_ALPHA_CPU
,
47 .instance_size
= sizeof(AlphaCPU
),
48 .instance_init
= alpha_cpu_initfn
,
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
)