mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
3d7196d43b
commit
f50f3dd5d6
4 changed files with 15 additions and 48 deletions
22
disas.c
22
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue