Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sim: Fix RISC-V multiply instructions on simulator
Because of recent 'Zmmul' support, the simulator is broken. This is caused by instruction classification changes: [Before] - INSN_CLASS_M : multiply / divide [After Zmmul] - INSN_CLASS_M : divide - INSN_CLASS_ZMMUL : multiply The simulator checks the instruction class to execute an instruction: - INSN_CLASS_I : 'I' - INSN_CLASS_M : 'M' (multiply / divide) - INSN_CLASS_A : 'A' 'Zmmul' moved multiply instructions to INSN_CLASS_ZMMUL and that instruction class is not handled by the simulator. This commit handles INSN_CLASS_ZMMUL for all 'M' instructions and adds a testcase to test all RV32M instructions run without any faults. sim/ChangeLog: * riscv/sim-main.c (execute_one): Add INSN_CLASS_ZMMUL to run multiply instructions correctly. * testsuite/riscv/m-ext.s: New test.
- Loading branch information