aboutsummaryrefslogtreecommitdiff
path: root/target/i386/cpu.h
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-09-13 18:04:56 +0200
committerEduardo Habkost <ehabkost@redhat.com>2017-09-19 09:09:32 -0300
commit311ca98d16bbb6a2a38b38ba898baa4a4d4ab9a7 (patch)
tree040c5451564ecd2020fcf40ca5fdf30c2eb2d086 /target/i386/cpu.h
parent6063d4c0f98b35a27ca018393d328a1825412a7e (diff)
pc: use generic cpu_model parsing
define default CPU type in generic way in pc_machine_class_init() and let common machine code to handle cpu_model parsing Patch also introduces TARGET_DEFAULT_CPU_TYPE define for 2 purposes: * make foo_machine_class_init() look uniform on every target * use define in [bsd|linux]-user targets to pick default cpu type Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1505318697-77161-5-git-send-email-imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target/i386/cpu.h')
-rw-r--r--target/i386/cpu.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 525d35d836..4035a11613 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1508,6 +1508,15 @@ uint64_t cpu_get_tsc(CPUX86State *env);
#define cpu_init(cpu_model) cpu_generic_init(TYPE_X86_CPU, cpu_model)
+#define X86_CPU_TYPE_SUFFIX "-" TYPE_X86_CPU
+#define X86_CPU_TYPE_NAME(name) (name X86_CPU_TYPE_SUFFIX)
+
+#ifdef TARGET_X86_64
+#define TARGET_DEFAULT_CPU_TYPE X86_CPU_TYPE_NAME("qemu64")
+#else
+#define TARGET_DEFAULT_CPU_TYPE X86_CPU_TYPE_NAME("qemu32")
+#endif
+
#define cpu_signal_handler cpu_x86_signal_handler
#define cpu_list x86_cpu_list