diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-26 14:31:44 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-03-06 15:46:18 +0100 |
commit | 0a8bfcbe7ca32f160c47faa9d611173b0697a698 (patch) | |
tree | ae83fd2eb3253ea485863ff1a37c33ad66cfc2c4 | |
parent | 724bac41906752aafd432714d13fc78da2265f1c (diff) | |
download | qemu-0a8bfcbe7ca32f160c47faa9d611173b0697a698.zip qemu-0a8bfcbe7ca32f160c47faa9d611173b0697a698.tar.gz qemu-0a8bfcbe7ca32f160c47faa9d611173b0697a698.tar.bz2 |
target/riscv: Set disassemble_info::endian value in disas_set_info()
Have the CPUClass::disas_set_info() callback set the
disassemble_info::endian field.
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-8-philmd@linaro.org>
-rw-r--r-- | target/riscv/cpu.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 47424fd..6da3917 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1152,6 +1152,15 @@ static void riscv_cpu_disas_set_info(CPUState *s, disassemble_info *info) CPURISCVState *env = &cpu->env; info->target_info = &cpu->cfg; + /* + * A couple of bits in MSTATUS set the endianness: + * - MSTATUS_UBE (User-mode), + * - MSTATUS_SBE (Supervisor-mode), + * - MSTATUS_MBE (Machine-mode) + * but we don't implement that yet. + */ + info->endian = BFD_ENDIAN_LITTLE; + switch (env->xl) { case MXL_RV32: info->print_insn = print_insn_riscv32; |