|
| From: | Philippe Mathieu-Daudé |
| Subject: | Re: [PATCH 12/61] target/hppa: Introduce TYPE_HPPA64_CPU |
| Date: | Thu, 19 Oct 2023 11:44:05 +0200 |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 |
On 18/10/23 23:50, Richard Henderson wrote:
Prepare for the qemu binary supporting both pa10 and pa20 at the same time. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/hppa/cpu-qom.h | 1 + target/hppa/cpu.h | 7 +++++++ target/hppa/cpu.c | 17 +++++++++++++++++ target/hppa/translate.c | 3 +++ 4 files changed, 28 insertions(+)
+#ifdef TARGET_HPPA64
+static void hppa64_cpu_initfn(Object *obj)
+{
+ HPPACPU *cpu = HPPA_CPU(obj);
+ cpu->is_pa20 = true;
+}
+
+static const TypeInfo hppa64_cpu_type_info = {
+ .name = TYPE_HPPA64_CPU,
+ .parent = TYPE_HPPA_CPU,
+ .instance_init = hppa64_cpu_initfn,
+};
+#endif
+
static void hppa_cpu_register_types(void)
{
type_register_static(&hppa_cpu_type_info);
+#ifdef TARGET_HPPA64
+ type_register_static(&hppa64_cpu_type_info);
+#endif
}
Preferably switching to DEFINE_TYPES(), Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
| [Prev in Thread] | Current Thread | [Next in Thread] |