]> git.proxmox.com Git - mirror_qemu.git/commit - target/riscv/translate.c
target/riscv: Prevent lost illegal instruction exceptions
authorGeorg Kotheimer <georg.kotheimer@kernkonzept.com>
Mon, 22 Mar 2021 12:16:09 +0000 (13:16 +0100)
committerAlistair Francis <alistair.francis@wdc.com>
Tue, 23 Mar 2021 01:54:40 +0000 (21:54 -0400)
commit9a27f69bd668d9d71674407badc412ce1231c7d5
treed13300fd0a3b47639ff102d12a27980653fd6948
parentd4e28f0eb8d6f4de42bf7685eb5d3b70407d5e50
target/riscv: Prevent lost illegal instruction exceptions

When decode_insn16() fails, we fall back to decode_RV32_64C() for
further compressed instruction decoding. However, prior to this change,
we did not raise an illegal instruction exception, if decode_RV32_64C()
fails to decode the instruction. This means that we skipped illegal
compressed instructions instead of raising an illegal instruction
exception.

Instead of patching decode_RV32_64C(), we can just remove it,
as it is dead code since f330433b363 anyway.

Signed-off-by: Georg Kotheimer <georg.kotheimer@kernkonzept.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210322121609.3097928-1-georg.kotheimer@kernkonzept.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/translate.c