syscall: 0.371 runtime: 0.369 instruction: 0.261 RISC-V: Simulation terminated with seg fault when encountering `vsra.vx` Description of problem: QEMU simulation terminated with segmentation fault. Here is the backtrace of the simulation ``` (gdb) r Starting program: qemu/build/qemu-riscv64 -cpu rv64,vext_spec=v1.0,v=true,Zfh=true,Zve32f=true,Zve64f=true,vlen=128 -B 0x100000 a.out Missing separate debuginfos, use: yum debuginfo-install glibc-2.28-164.el8_5.3.x86_64 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x7ffff4edd700 (LWP 3239772)] Thread 1 "qemu-riscv64" received signal SIGSEGV, Segmentation fault. 0x00007fffe8004fad in code_gen_buffer () Missing separate debuginfos, use: yum debuginfo-install glib2-2.56.4-156.el8.x86_64 gmp-6.1.2-10.el8.x86_64 gnutls-3.6.16-4.el8.x86_64 libffi-3.1-22.el8.x86_64 libidn2-2.2.0-1.el8.x86_64 libtasn1-4.13-3.el8.x86_64 libunistring-0.9.9-3.el8.x86_64 p11-kit-0.23.22-1.el8.x86_64 pcre-8.42-6.el8.x86_64 (gdb) bt #0 0x00007fffe8004fad in code_gen_buffer () #1 0x00005555556a0b9b in cpu_tb_exec (tb_exit=, itb=, cpu=0x7fffe8005000 ) at ../accel/tcg/cpu-exec.c:358 #2 cpu_loop_exec_tb (tb_exit=, last_tb=, tb=, cpu=0x7fffe8005000 ) at ../accel/tcg/cpu-exec.c:848 #3 cpu_exec (cpu=cpu@entry=0x555555eed3d0) at ../accel/tcg/cpu-exec.c:1007 #4 0x00005555555e6d30 in cpu_loop (env=0x555555ef56f0) at ../linux-user/riscv/cpu_loop.c:37 #5 0x00005555555df9f7 in main (argc=, argv=, envp=) at ../linux-user/main.c:909 ``` Steps to reproduce: 1. Checkout to QEMU's latest master (`ec11dc41eec5142b4776db1296972c6323ba5847`) 2. `mkdir build ; cd build ; ../configure ; make -j24` 3. `qemu-riscv64 -cpu rv64,vext_spec=v1.0,v=true,Zfh=true,Zve32f=true,Zve64f=true,vlen=128 -B 0x100000 ./a.out` Additional information: Attaching code (output.c) and binary (a.out) [a.out](/uploads/0ecfb436a439619527ef645bdc781a48/a.out) [output.c](/uploads/cd492b4c9468f0b48412e76e7f6fcf91/output.c)