Message ID | 20250127115426.51355-10-philmd@linaro.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | disas: Have CPUClass::disas_set_info() callback set the endianness | expand |
On 27/01/2025 12.54, Philippe Mathieu-Daudé wrote: > Have the CPUClass::disas_set_info() callback set the > disassemble_info::endian field. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > target/xtensa/cpu.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c > index efbfe73fcfb..bc170dbb5cc 100644 > --- a/target/xtensa/cpu.c > +++ b/target/xtensa/cpu.c > @@ -159,6 +159,11 @@ static void xtensa_cpu_disas_set_info(CPUState *cs, disassemble_info *info) > > info->private_data = cpu->env.config->isa; > info->print_insn = print_insn_xtensa; > +#if TARGET_BIG_ENDIAN > + info->endian = BFD_ENDIAN_BIG; > +#else > + info->endian = BFD_ENDIAN_LITTLE; > +#endif > } Reviewed-by: Thomas Huth <thuth@redhat.com>
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index efbfe73fcfb..bc170dbb5cc 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -159,6 +159,11 @@ static void xtensa_cpu_disas_set_info(CPUState *cs, disassemble_info *info) info->private_data = cpu->env.config->isa; info->print_insn = print_insn_xtensa; +#if TARGET_BIG_ENDIAN + info->endian = BFD_ENDIAN_BIG; +#else + info->endian = BFD_ENDIAN_LITTLE; +#endif } static void xtensa_cpu_realizefn(DeviceState *dev, Error **errp)
Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- target/xtensa/cpu.c | 5 +++++ 1 file changed, 5 insertions(+)