aboutsummaryrefslogtreecommitdiff
path: root/disas.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2017-09-14 08:10:53 -0700
committerRichard Henderson <richard.henderson@linaro.org>2017-10-25 11:41:42 +0200
commitf50f3dd5d6a982943ba603ad5d79a7f6a0f98404 (patch)
treee8c5562ceae26fe6b2944024e29717386534ef8e /disas.c
parent3d7196d43bfe12efe98568cb60057e273652b99b (diff)
target/i386: Convert to disas_set_info hook
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'disas.c')
-rw-r--r--disas.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/disas.c b/disas.c
index 54eea3f9c9..7e22a80da6 100644
--- a/disas.c
+++ b/disas.c
@@ -204,16 +204,7 @@ void target_disas(FILE *out, CPUState *cpu, target_ulong code,
cc->disas_set_info(cpu, &s.info);
}
-#if defined(TARGET_I386)
- if (flags == 2) {
- s.info.mach = bfd_mach_x86_64;
- } else if (flags == 1) {
- s.info.mach = bfd_mach_i386_i8086;
- } else {
- s.info.mach = bfd_mach_i386_i386;
- }
- s.info.print_insn = print_insn_i386;
-#elif defined(TARGET_PPC)
+#if defined(TARGET_PPC)
if ((flags >> 16) & 1) {
s.info.endian = BFD_ENDIAN_LITTLE;
}
@@ -389,16 +380,7 @@ void monitor_disas(Monitor *mon, CPUState *cpu,
cc->disas_set_info(cpu, &s.info);
}
-#if defined(TARGET_I386)
- if (flags == 2) {
- s.info.mach = bfd_mach_x86_64;
- } else if (flags == 1) {
- s.info.mach = bfd_mach_i386_i8086;
- } else {
- s.info.mach = bfd_mach_i386_i386;
- }
- s.info.print_insn = print_insn_i386;
-#elif defined(TARGET_PPC)
+#if defined(TARGET_PPC)
if (flags & 0xFFFF) {
/* If we have a precise definition of the instruction set, use it. */
s.info.mach = flags & 0xFFFF;