From c6422d7be70f14bf7140085f2fc7a592737f5df5 Mon Sep 17 00:00:00 2001 From: Tsukasa OI Date: Wed, 31 Aug 2022 01:46:08 +0000 Subject: sim/riscv: fix multiply instructions on simulator After this commit: commit 0938b032daa52129b4215d8e0eedb6c9804f5280 Date: Wed Feb 2 10:06:15 2022 +0900 RISC-V: Add 'Zmmul' extension in assembler. some instructions in the RISC-V simulator stopped working as a new instruction class 'INSN_CLASS_ZMMUL' was added, and some existing instructions were moved into this class. The simulator doesn't currently handle this instruction class, and so the instructions will now cause an illegal instruction trap. This commit adds support for INSN_CLASS_ZMMUL, and adds a test that ensures the affected instructions can be executed by the simulator. Reviewed-by: Palmer Dabbelt Reviewed-by: Andrew Burgess --- sim/riscv/sim-main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sim/riscv') diff --git a/sim/riscv/sim-main.c b/sim/riscv/sim-main.c index 30d2f1e..0156f79 100644 --- a/sim/riscv/sim-main.c +++ b/sim/riscv/sim-main.c @@ -936,6 +936,7 @@ execute_one (SIM_CPU *cpu, unsigned_word iw, const struct riscv_opcode *op) case INSN_CLASS_I: return execute_i (cpu, iw, op); case INSN_CLASS_M: + case INSN_CLASS_ZMMUL: return execute_m (cpu, iw, op); default: TRACE_INSN (cpu, "UNHANDLED EXTENSION: %d", op->insn_class); -- cgit v1.1