summaryrefslogtreecommitdiff
path: root/target/ppc/translate_init.inc.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/ppc/translate_init.inc.c')
-rw-r--r--target/ppc/translate_init.inc.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c
index d920d3e538..263e63cb03 100644
--- a/target/ppc/translate_init.inc.c
+++ b/target/ppc/translate_init.inc.c
@@ -9647,17 +9647,6 @@ static int ppc_fixup_cpu(PowerPCCPU *cpu)
return 0;
}
-static inline bool ppc_cpu_is_valid(PowerPCCPUClass *pcc)
-{
-#ifdef TARGET_PPCEMB
- return pcc->mmu_model == POWERPC_MMU_BOOKE ||
- pcc->mmu_model == POWERPC_MMU_SOFT_4xx ||
- pcc->mmu_model == POWERPC_MMU_SOFT_4xx_Z;
-#else
- return true;
-#endif
-}
-
static void ppc_cpu_realize(DeviceState *dev, Error **errp)
{
CPUState *cs = CPU(dev);
@@ -9681,8 +9670,6 @@ static void ppc_cpu_realize(DeviceState *dev, Error **errp)
}
}
- assert(ppc_cpu_is_valid(pcc));
-
create_ppc_opcodes(cpu, &local_err);
if (local_err != NULL) {
error_propagate(errp, local_err);
@@ -9933,10 +9920,6 @@ static gint ppc_cpu_compare_class_pvr(gconstpointer a, gconstpointer b)
return -1;
}
- if (!ppc_cpu_is_valid(pcc)) {
- return -1;
- }
-
return pcc->pvr == pvr ? 0 : -1;
}
@@ -9967,10 +9950,6 @@ static gint ppc_cpu_compare_class_pvr_mask(gconstpointer a, gconstpointer b)
return -1;
}
- if (!ppc_cpu_is_valid(pcc)) {
- return -1;
- }
-
if (pcc->pvr_match(pcc, pvr)) {
return 0;
}
@@ -10036,11 +10015,7 @@ static ObjectClass *ppc_cpu_class_by_name(const char *name)
g_free(typename);
g_free(cpu_model);
- if (oc && ppc_cpu_is_valid(POWERPC_CPU_CLASS(oc))) {
- return oc;
- }
-
- return NULL;
+ return oc;
}
static void ppc_cpu_parse_featurestr(const char *type, char *features,
@@ -10146,9 +10121,6 @@ static void ppc_cpu_list_entry(gpointer data, gpointer user_data)
char *name;
int i;
- if (!ppc_cpu_is_valid(pcc)) {
- return;
- }
if (unlikely(strcmp(typename, TYPE_HOST_POWERPC_CPU) == 0)) {
return;
}
@@ -10206,11 +10178,6 @@ static void ppc_cpu_defs_entry(gpointer data, gpointer user_data)
const char *typename;
CpuDefinitionInfoList *entry;
CpuDefinitionInfo *info;
- PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
-
- if (!ppc_cpu_is_valid(pcc)) {
- return;
- }
typename = object_class_get_name(oc);
info = g_malloc0(sizeof(*info));