[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/61] target/hppa: Implement cpu_list
From: |
Richard Henderson |
Subject: |
[PATCH 14/61] target/hppa: Implement cpu_list |
Date: |
Wed, 18 Oct 2023 14:50:48 -0700 |
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 22690e351d..30010858a9 100644
--- a/target/hppa/cpu.h
+++ b/target/hppa/cpu.h
@@ -365,4 +365,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 41abdb04d0..1975aa9621 100644
--- a/target/hppa/cpu.c
+++ b/target/hppa/cpu.c
@@ -162,6 +162,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
- [PATCH 07/61] target/hppa: Truncate rotate count in trans_shrpw_sar, (continued)
- [PATCH 07/61] target/hppa: Truncate rotate count in trans_shrpw_sar, Richard Henderson, 2023/10/18
- [PATCH 08/61] target/hppa: Fix trans_ds for hppa64, Richard Henderson, 2023/10/18
- [PATCH 09/61] target/hppa: Fix do_add, do_sub for hppa64, Richard Henderson, 2023/10/18
- [PATCH 13/61] target/hppa: Make HPPA_BTLB_ENTRIES variable, Richard Henderson, 2023/10/18
- [PATCH 18/61] target/hppa: Adjust hppa_cpu_dump_state for hppa64, Richard Henderson, 2023/10/18
- [PATCH 12/61] target/hppa: Introduce TYPE_HPPA64_CPU, Richard Henderson, 2023/10/18
- [PATCH 28/61] target/hppa: Drop attempted gdbstub support for hppa64, Richard Henderson, 2023/10/18
- [PATCH 31/61] target/hppa: Decode d for unit instructions, Richard Henderson, 2023/10/18
- [PATCH 11/61] target/hppa: Fix extrw and depw with sar for hppa64, Richard Henderson, 2023/10/18
- [PATCH 14/61] target/hppa: Implement cpu_list,
Richard Henderson <=
- [PATCH 17/61] target/hppa: Handle absolute addresses for pa2.0, Richard Henderson, 2023/10/18
- [PATCH 30/61] target/hppa: Decode d for logical instructions, Richard Henderson, 2023/10/18
- [PATCH 27/61] linux-user/hppa: Fixes for TARGET_ABI32, Richard Henderson, 2023/10/18
- [PATCH 36/61] target/hppa: Decode d for cmpb instructions, Richard Henderson, 2023/10/18
- [PATCH 38/61] target/hppa: Decode ADDB double-word, Richard Henderson, 2023/10/18
- [PATCH 19/61] hw/hppa: Translate phys addresses for the cpu, Richard Henderson, 2023/10/18
- [PATCH 04/61] target/hppa: Remove load_const, Richard Henderson, 2023/10/18
- [PATCH 20/61] target/hppa: Fix hppa64 addressing, Richard Henderson, 2023/10/18
- [PATCH 25/61] target/hppa: Pass d to do_sed_cond, Richard Henderson, 2023/10/18