[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/85] target/hppa: Implement hppa_cpu_class_by_name
|
From: |
Richard Henderson |
|
Subject: |
[PULL 20/85] target/hppa: Implement hppa_cpu_class_by_name |
|
Date: |
Mon, 6 Nov 2023 19:03:02 -0800 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/hppa/target_elf.h | 2 +-
target/hppa/cpu.c | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/linux-user/hppa/target_elf.h b/linux-user/hppa/target_elf.h
index 82b4e9535e..19cae8bd65 100644
--- a/linux-user/hppa/target_elf.h
+++ b/linux-user/hppa/target_elf.h
@@ -9,6 +9,6 @@
#define HPPA_TARGET_ELF_H
static inline const char *cpu_get_model(uint32_t eflags)
{
- return "any";
+ return "hppa";
}
#endif
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
index 27c74f0d27..70ce0c3b99 100644
--- a/target/hppa/cpu.c
+++ b/target/hppa/cpu.c
@@ -158,7 +158,15 @@ static void hppa_cpu_initfn(Object *obj)
static ObjectClass *hppa_cpu_class_by_name(const char *cpu_model)
{
- return object_class_by_name(TYPE_HPPA_CPU);
+ g_autofree char *typename = g_strconcat(cpu_model, "-cpu", NULL);
+ ObjectClass *oc = object_class_by_name(typename);
+
+ if (oc &&
+ !object_class_is_abstract(oc) &&
+ object_class_dynamic_cast(oc, TYPE_HPPA_CPU)) {
+ return oc;
+ }
+ return NULL;
}
static void hppa_cpu_list_entry(gpointer data, gpointer user_data)
--
2.34.1
- [PULL 28/85] target/hppa: Mask inputs in copy_iaoq_entry, (continued)
- [PULL 28/85] target/hppa: Mask inputs in copy_iaoq_entry, Richard Henderson, 2023/11/06
- [PULL 29/85] target/hppa: sar register allows only 5 bits on 32-bit CPU, Richard Henderson, 2023/11/06
- [PULL 31/85] target/hppa: Pass d to do_sub_cond, Richard Henderson, 2023/11/06
- [PULL 21/85] target/hppa: Update cpu_hppa_get/put_psw for hppa64, Richard Henderson, 2023/11/06
- [PULL 33/85] target/hppa: Pass d to do_sed_cond, Richard Henderson, 2023/11/06
- [PULL 23/85] target/hppa: Adjust hppa_cpu_dump_state for hppa64, Richard Henderson, 2023/11/06
- [PULL 24/85] target/hppa: Fix hppa64 addressing, Richard Henderson, 2023/11/06
- [PULL 35/85] linux-user/hppa: Fixes for TARGET_ABI32, Richard Henderson, 2023/11/06
- [PULL 34/85] target/hppa: Pass d to do_unit_cond, Richard Henderson, 2023/11/06
- [PULL 39/85] target/hppa: Decode d for unit instructions, Richard Henderson, 2023/11/06
- [PULL 20/85] target/hppa: Implement hppa_cpu_class_by_name,
Richard Henderson <=
- [PULL 32/85] target/hppa: Pass d to do_log_cond, Richard Henderson, 2023/11/06
- [PULL 36/85] target/hppa: Drop attempted gdbstub support for hppa64, Richard Henderson, 2023/11/06
- [PULL 40/85] target/hppa: Decode d for cmpclr instructions, Richard Henderson, 2023/11/06
- [PULL 42/85] target/hppa: Decode d for sub instructions, Richard Henderson, 2023/11/06
- [PULL 44/85] target/hppa: Decode d for cmpb instructions, Richard Henderson, 2023/11/06
- [PULL 41/85] target/hppa: Decode d for add instructions, Richard Henderson, 2023/11/06
- [PULL 43/85] target/hppa: Decode d for bb instructions, Richard Henderson, 2023/11/06
- [PULL 46/85] target/hppa: Decode ADDB double-word, Richard Henderson, 2023/11/06
- [PULL 47/85] target/hppa: Implement LDD, LDCD, LDDA, STD, STDA, Richard Henderson, 2023/11/06
- [PULL 48/85] target/hppa: Implement DEPD, DEPDI, Richard Henderson, 2023/11/06