qemu/disas
LIU Zhiwei f65f3ebfad disas/riscv: Guard dec->cfg dereference for host disassemble
For riscv host, it will set dec->cfg to zero. Thus we shuld guard
the dec->cfg deference for riscv host disassemble.

And in general, we should only use dec->cfg for target in three cases:

1) For not incompatible encodings, such as zcmp/zcmt/zfinx.
2) For maybe-ops encodings, they are better to be disassembled to
   the "real" extensions, such as zicfiss. The guard of dec->zimop
   and dec->zcmop is for comment and avoid check for every extension
   that encoded in maybe-ops area.
3) For custom encodings, we have to use dec->cfg to disassemble
   custom encodings using the same encoding area.

Signed-off-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20241206032411.52528-1-zhiwei_liu@linux.alibaba.com>
2025-01-16 20:57:16 -08:00
..
alpha.c disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h 2019-04-18 22:18:59 +02:00
capstone.c disas: use result of ->read_memory_func 2022-10-06 11:53:40 +01:00
disas-common.c disas: Use translator_st to get disassembly data 2024-05-15 08:55:19 +02:00
disas-host.c disas: Split disas.c 2024-05-15 08:55:19 +02:00
disas-internal.h disas: Split disas.c 2024-05-15 08:55:19 +02:00
disas-mon.c disas: Use translator_st to get disassembly data 2024-05-15 08:55:19 +02:00
disas-target.c disas: Use translator_st to get disassembly data 2024-05-15 08:55:19 +02:00
hexagon.c Hexagon (disas/hexagon.c) fix memory leak for early exit cases 2021-08-12 09:06:05 -05:00
hppa.c disas/hppa: honour show_opcodes 2024-03-06 12:35:51 +00:00
m68k.c disas/m68k: Replace sprintf() by snprintf() 2024-06-04 10:02:39 +02:00
meson.build disas: Remove CRIS disassembler 2024-10-07 11:33:20 +02:00
microblaze.c disas/microblaze: Split get_field_special 2024-06-05 12:29:54 -07:00
mips.c disas/mips: Fix branch displacement for BEQZC and BNEZC 2022-10-31 11:32:07 +01:00
nanomips.c nanomips: fix warnings with GCC 14 2024-04-08 21:21:48 +02:00
objdump.c disas: Split disas.c 2024-05-15 08:55:19 +02:00
riscv-xthead.c disas/riscv: Clean up includes 2024-01-30 21:20:20 +03:00
riscv-xthead.h disas/riscv: Add support for XThead* instructions 2023-07-10 22:29:14 +10:00
riscv-xventana.c disas/riscv: Clean up includes 2024-01-30 21:20:20 +03:00
riscv-xventana.h disas/riscv: Add support for XVentanaCondOps 2023-07-10 22:29:14 +10:00
riscv.c disas/riscv: Guard dec->cfg dereference for host disassemble 2025-01-16 20:57:16 -08:00
riscv.h disas/riscv: enable disassembly for compressed sspush/sspopchk 2024-10-31 13:51:24 +10:00
sh4.c disas/sh4: Add missing fallthrough annotations 2020-07-13 11:40:52 +02:00
sparc.c disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h 2019-04-18 22:18:59 +02:00
xtensa.c disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h 2019-04-18 22:18:59 +02:00