aboutsummaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-10-05 15:50:56 +0200
committerEduardo Habkost <ehabkost@redhat.com>2017-10-27 16:03:55 +0200
commitd5ebe625569365e83c104f7ef4bbeab282299407 (patch)
tree9ca6ca5f27852e69298f2bae0eabdcbc9629189c /linux-user/main.c
parent974e58d2105f1b728232ce354441f95ff0349388 (diff)
sh4: simplify superh_cpu_class_by_name()
currently for sh4 cpu_model argument for '-cpu' option could be either 'cpu model' name or cpu_typename. however typically '-cpu' takes 'cpu model' name and cpu type for sh4 target isn't advertised publicly ('-cpu help' prints only 'cpu model' names) so we shouldn't care about this use case (it's more of a bug). 1. Drop '-cpu cpu_typename' to align with the rest of targets. 2. Compose searched for typename from cpu model and use it with object_class_by_name() directly instead of over-complicated object_class_get_list() g_slist_find_custom() + superh_cpu_name_compare() With #1 droped, #2 could be used for both lookups which simplifies superh_cpu_class_by_name() quite a bit. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1507211474-188400-23-git-send-email-imammedo@redhat.com> [ehabkost: Include fixup sent by Igor] Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 28353f1a75..aa02f25b85 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -4331,7 +4331,7 @@ int main(int argc, char **argv, char **envp)
cpu_model = "750";
# endif
#elif defined TARGET_SH4
- cpu_model = TYPE_SH7785_CPU;
+ cpu_model = "sh7785";
#elif defined TARGET_S390X
cpu_model = "qemu";
#else