[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/85] target/hppa: Implement cpu_list
|
From: |
Richard Henderson |
|
Subject: |
[PULL 19/85] target/hppa: Implement cpu_list |
|
Date: |
Mon, 6 Nov 2023 19:03:01 -0800 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/cpu.h | 5 +++++
target/hppa/cpu.c | 24 ++++++++++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h
index 48ddcffb8a..301c82114a 100644
--- a/target/hppa/cpu.h
+++ b/target/hppa/cpu.h
@@ -396,4 +396,9 @@ int hppa_artype_for_page(CPUHPPAState *env, target_ulong
vaddr);
#endif
G_NORETURN void hppa_dynamic_excp(CPUHPPAState *env, int excp, uintptr_t ra);
+#define CPU_RESOLVING_TYPE TYPE_HPPA_CPU
+
+#define cpu_list hppa_cpu_list
+void hppa_cpu_list(void);
+
#endif /* HPPA_CPU_H */
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
index 07fae42bb8..27c74f0d27 100644
--- a/target/hppa/cpu.c
+++ b/target/hppa/cpu.c
@@ -161,6 +161,30 @@ static ObjectClass *hppa_cpu_class_by_name(const char
*cpu_model)
return object_class_by_name(TYPE_HPPA_CPU);
}
+static void hppa_cpu_list_entry(gpointer data, gpointer user_data)
+{
+ ObjectClass *oc = data;
+ CPUClass *cc = CPU_CLASS(oc);
+ const char *tname = object_class_get_name(oc);
+ g_autofree char *name = g_strndup(tname, strchr(tname, '-') - tname);
+
+ if (cc->deprecation_note) {
+ qemu_printf(" %s (deprecated)\n", name);
+ } else {
+ qemu_printf(" %s\n", name);
+ }
+}
+
+void hppa_cpu_list(void)
+{
+ GSList *list;
+
+ list = object_class_get_list_sorted(TYPE_HPPA_CPU, false);
+ qemu_printf("Available CPUs:\n");
+ g_slist_foreach(list, hppa_cpu_list_entry, NULL);
+ g_slist_free(list);
+}
+
#ifndef CONFIG_USER_ONLY
#include "hw/core/sysemu-cpu-ops.h"
--
2.34.1
- [PULL 22/85] target/hppa: Handle absolute addresses for pa2.0, (continued)
- [PULL 22/85] target/hppa: Handle absolute addresses for pa2.0, Richard Henderson, 2023/11/06
- [PULL 37/85] target/hppa: Remove TARGET_HPPA64, Richard Henderson, 2023/11/06
- [PULL 38/85] target/hppa: Decode d for logical instructions, Richard Henderson, 2023/11/06
- [PULL 16/85] target/hppa: Fix extrw and depw with sar for hppa64, Richard Henderson, 2023/11/06
- [PULL 17/85] target/hppa: Introduce TYPE_HPPA64_CPU, Richard Henderson, 2023/11/06
- [PULL 06/85] target/hppa: Populate an interval tree with valid tlb entries, Richard Henderson, 2023/11/06
- [PULL 26/85] target/hppa: Always use copy_iaoq_entry to set cpu_iaoq_[fb], Richard Henderson, 2023/11/06
- [PULL 07/85] target/hppa: Remove get_temp, Richard Henderson, 2023/11/06
- [PULL 09/85] target/hppa: Remove load_const, Richard Henderson, 2023/11/06
- [PULL 25/85] target/hppa: Pass DisasContext to copy_iaoq_entry, Richard Henderson, 2023/11/06
- [PULL 19/85] target/hppa: Implement cpu_list,
Richard Henderson <=
- [PULL 27/85] target/hppa: Use copy_iaoq_entry for link in do_ibranch, Richard Henderson, 2023/11/06
- [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