summaryrefslogtreecommitdiff
path: root/target-ppc/translate_init.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-02-23 07:34:28 +0000
committerAlexander Graf <agraf@suse.de>2013-03-08 21:04:53 +0100
commit55d3d1a4d1a8dca7a0f31dc0d212d7fb219563c2 (patch)
tree941ea9464c5d15c20b6ca191069cc7887a15352b /target-ppc/translate_init.c
parent5ba4576b858c0d6056f59abb7e17a2b63f7905f3 (diff)
downloadqemu-55d3d1a4d1a8dca7a0f31dc0d212d7fb219563c2.tar.gz
qemu-55d3d1a4d1a8dca7a0f31dc0d212d7fb219563c2.tar.bz2
qemu-55d3d1a4d1a8dca7a0f31dc0d212d7fb219563c2.zip
target-ppc: List alias names alongside CPU models
Revert adding a separate -cpu ? output section for aliases and list them per CPU subclass. Requested-by: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc/translate_init.c')
-rw-r--r--target-ppc/translate_init.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 521cdcca8c..6fbb7b3d52 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -8392,6 +8392,7 @@ static void ppc_cpu_list_entry(gpointer data, gpointer user_data)
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
const char *typename = object_class_get_name(oc);
char *name;
+ int i;
#if defined(TARGET_PPCEMB)
if (pcc->mmu_model != POWERPC_MMU_BOOKE) {
@@ -8406,6 +8407,16 @@ static void ppc_cpu_list_entry(gpointer data, gpointer user_data)
strlen(typename) - strlen("-" TYPE_POWERPC_CPU));
(*s->cpu_fprintf)(s->file, "PowerPC %-16s PVR %08x\n",
name, pcc->pvr);
+ for (i = 0; i < ARRAY_SIZE(ppc_cpu_aliases); i++) {
+ const PowerPCCPUAlias *alias = &ppc_cpu_aliases[i];
+ ObjectClass *alias_oc = ppc_cpu_class_by_name(alias->model);
+
+ if (alias_oc != oc) {
+ continue;
+ }
+ (*s->cpu_fprintf)(s->file, "PowerPC %-16s (alias for %s)\n",
+ alias->alias, name);
+ }
g_free(name);
}
@@ -8416,7 +8427,6 @@ void ppc_cpu_list(FILE *f, fprintf_function cpu_fprintf)
.cpu_fprintf = cpu_fprintf,
};
GSList *list;
- int i;
list = object_class_get_list(TYPE_POWERPC_CPU, false);
list = g_slist_sort(list, ppc_cpu_list_compare);
@@ -8427,17 +8437,6 @@ void ppc_cpu_list(FILE *f, fprintf_function cpu_fprintf)
cpu_fprintf(f, "\n");
cpu_fprintf(f, "PowerPC %-16s\n", "host");
#endif
-
- cpu_fprintf(f, "\n");
- for (i = 0; i < ARRAY_SIZE(ppc_cpu_aliases); i++) {
- ObjectClass *oc = ppc_cpu_class_by_name(ppc_cpu_aliases[i].model);
- if (oc == NULL) {
- /* Hide aliases that point to a TODO or TODO_USER_ONLY model */
- continue;
- }
- cpu_fprintf(f, "PowerPC %-16s\n",
- ppc_cpu_aliases[i].alias);
- }
}
static void ppc_cpu_defs_entry(gpointer data, gpointer user_data)