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.hender...@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é <phi...@linaro.org>