riscv / riscv-bitmanip

Working draft of the proposed RISC-V Bitmanipulation extension
https://jira.riscv.org/browse/RVG-122
Creative Commons Attribution 4.0 International
204 stars 65 forks source link

Should I run this test in QEMU? #127

Closed ArdxWe closed 3 years ago

ArdxWe commented 3 years ago

tests/run.sh

#!/bin/bash
set -ex
gcc -o testgen -Wall -O1 -I../cproofs testgen.cc
./testgen > tests.c
/opt/riscv64b/bin/riscv64-unknown-elf-gcc -Wall  -march=rv64gb -Os -o tests tests.c
/opt/riscv64b/bin/spike --isa=RV64GCB pk tests

I want to modify the last command to use qemu, But it crashed during runtime.

./qemu-riscv64 -cpu rv64,x-b=true tests
[1]    22631 illegal hardware instruction (core dumped)  ~/Downloads/qemu-riscv64 -cpu rv64,x-b=true tests

Should I run this test in QEMU https://github.com/sifive/qemu/tree/rvb-upstream-v6?

kito-cheng commented 3 years ago

IIRC SiFive's qemu only implement zba, zbb and zbs, so...that should be expected behavior I think...