benchmarks in riscv-tests fail to run on gem5
I have observed that this is caused by an attempt to read mstatus directly when program is running in u-mode. Basically, it seems like the riscv-tests do not support Linux abi and are intended to be run on a simulator like spike which takes care of skipping over instructions which cause such exceptions.
Things to do based on gem5 meeting:
Drop “RISCV-tests” on resources.
Incorporate RISCV-compliance tests ( )
riscv asm tests can be used for testing at the moment
hmm… maybe we need to update our testing strategy for RISC-V. It would be nice if we could use similar compliance tests as upstream RISC-V. It would give us some confidence that we’ve correctly implemented RISC-V.
If resources/riscv-tests isn’t working, we should probably remove it from the resources.
Yes, I recall getting Illegal Instruction error also if I directly compile the benchmarks from “riscv/riscv-tests”. I can only run the tests under the modified “https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/asmtest”.
Hi Peter, thanks for the comment. I wonder if you also ran the [benchmarks| ] in riscv-tests? I think I ran few asm tests earlier and they seemed to work fine for me as well.
Hi Ayaz, I ran riscv-tests in SE mode recently (only asm tests) and they seem to work fine for me. If it is a related issue maybe we can discuss about it.