mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
target: Set disassemble_info::endian value for little-endian targets
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field for little-endian targets. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250210212931.62401-2-philmd@linaro.org>
This commit is contained in:
parent
96adf9b404
commit
b8b37affc7
6 changed files with 6 additions and 0 deletions
|
@ -85,6 +85,7 @@ static int alpha_cpu_mmu_index(CPUState *cs, bool ifetch)
|
||||||
|
|
||||||
static void alpha_cpu_disas_set_info(CPUState *cpu, disassemble_info *info)
|
static void alpha_cpu_disas_set_info(CPUState *cpu, disassemble_info *info)
|
||||||
{
|
{
|
||||||
|
info->endian = BFD_ENDIAN_LITTLE;
|
||||||
info->mach = bfd_mach_alpha_ev6;
|
info->mach = bfd_mach_alpha_ev6;
|
||||||
info->print_insn = print_insn_alpha;
|
info->print_insn = print_insn_alpha;
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,6 +102,7 @@ static void avr_cpu_reset_hold(Object *obj, ResetType type)
|
||||||
|
|
||||||
static void avr_cpu_disas_set_info(CPUState *cpu, disassemble_info *info)
|
static void avr_cpu_disas_set_info(CPUState *cpu, disassemble_info *info)
|
||||||
{
|
{
|
||||||
|
info->endian = BFD_ENDIAN_LITTLE;
|
||||||
info->mach = bfd_arch_avr;
|
info->mach = bfd_arch_avr;
|
||||||
info->print_insn = avr_print_insn;
|
info->print_insn = avr_print_insn;
|
||||||
}
|
}
|
||||||
|
|
|
@ -293,6 +293,7 @@ static void hexagon_cpu_reset_hold(Object *obj, ResetType type)
|
||||||
static void hexagon_cpu_disas_set_info(CPUState *s, disassemble_info *info)
|
static void hexagon_cpu_disas_set_info(CPUState *s, disassemble_info *info)
|
||||||
{
|
{
|
||||||
info->print_insn = print_insn_hexagon;
|
info->print_insn = print_insn_hexagon;
|
||||||
|
info->endian = BFD_ENDIAN_LITTLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hexagon_cpu_realize(DeviceState *dev, Error **errp)
|
static void hexagon_cpu_realize(DeviceState *dev, Error **errp)
|
||||||
|
|
|
@ -8691,6 +8691,7 @@ static void x86_disas_set_info(CPUState *cs, disassemble_info *info)
|
||||||
X86CPU *cpu = X86_CPU(cs);
|
X86CPU *cpu = X86_CPU(cs);
|
||||||
CPUX86State *env = &cpu->env;
|
CPUX86State *env = &cpu->env;
|
||||||
|
|
||||||
|
info->endian = BFD_ENDIAN_LITTLE;
|
||||||
info->mach = (env->hflags & HF_CS64_MASK ? bfd_mach_x86_64
|
info->mach = (env->hflags & HF_CS64_MASK ? bfd_mach_x86_64
|
||||||
: env->hflags & HF_CS32_MASK ? bfd_mach_i386_i386
|
: env->hflags & HF_CS32_MASK ? bfd_mach_i386_i386
|
||||||
: bfd_mach_i386_i8086);
|
: bfd_mach_i386_i8086);
|
||||||
|
|
|
@ -624,6 +624,7 @@ static void loongarch_cpu_reset_hold(Object *obj, ResetType type)
|
||||||
|
|
||||||
static void loongarch_cpu_disas_set_info(CPUState *s, disassemble_info *info)
|
static void loongarch_cpu_disas_set_info(CPUState *s, disassemble_info *info)
|
||||||
{
|
{
|
||||||
|
info->endian = BFD_ENDIAN_LITTLE;
|
||||||
info->print_insn = print_insn_loongarch;
|
info->print_insn = print_insn_loongarch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -168,6 +168,7 @@ static void rx_cpu_set_irq(void *opaque, int no, int request)
|
||||||
|
|
||||||
static void rx_cpu_disas_set_info(CPUState *cpu, disassemble_info *info)
|
static void rx_cpu_disas_set_info(CPUState *cpu, disassemble_info *info)
|
||||||
{
|
{
|
||||||
|
info->endian = BFD_ENDIAN_LITTLE;
|
||||||
info->mach = bfd_mach_rx;
|
info->mach = bfd_mach_rx;
|
||||||
info->print_insn = print_insn_rx;
|
info->print_insn = print_insn_rx;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue