qemu-system-riscv32 does not pass official riscv-tests

Host environment

  • Operating system: windows 11 23H2 WSL
  • OS/kernel version: Linux LAPTOP-9OB1KT81 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
  • Architecture: x86
  • QEMU flavor: qemu-system-x86_64
  • QEMU version: QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.24)
  • QEMU command line:
     qemu-system-riscv32 -m 2G -nographic -machine virt -kernel asm/isa/isa/rv32ui/v/rv32ui-v-and -bios none -d in_asm

Emulated/Virtualized environment

  • Operating system: windows 11 23H2 WSL
  • OS/kernel version: Linux LAPTOP-9OB1KT81 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
  • Architecture: x86

Description of problem

I run riscv-tests using the above command and find qemu raises Illegalinstruction when sret in the machine mode.Therefore qemu cannot pass the rv32ui-v-and test.

Additional information

The tests https://github.com/riscv-software-src/riscv-tests