Add ACT4 user-mode test coverage#731
Draft
cyrilmhansen wants to merge 4 commits into
Draft
Conversation
jserv
reviewed
May 15, 2026
Contributor
There was a problem hiding this comment.
Benchmarks
Details
| Benchmark suite | Current: 67b9f80 | Previous: 1456c8a | Ratio |
|---|---|---|---|
Dhrystone |
1563.333 DMIPS |
1569.333 DMIPS |
1.00 |
CoreMark |
1088.292 iterations/sec |
1121.207 iterations/sec |
1.03 |
This comment was automatically generated by workflow using github-action-benchmark.
added 4 commits
May 15, 2026 21:41
Put the ACT Sail tool directory first in PATH while generating ACT ELFs so sail_riscv_sim --version does not resolve to the older arch-test prebuilt.
1456c8a to
67b9f80
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR brings up ACT4 user-mode architectural testing for rv32emu's RV32IMAF(C) configuration and fixes the main emulator issues exposed by those tests.
Related issue: #730
Changes include:
sail_riscv_sim --versiondoes not pick the older arch-test prebuilt.masteractivity through7b4e872/ PR Refine WebAssembly user/system mode demos #732.Notes
Zalrsc is intentionally not included in the default ACT batch yet. Zalrsc-sc.w still reaches the ACT fail halt path even when the dumped signature matches Sail's generated .results, so it needs separate LR/SC/tohost investigation before being enabled as a default passing batch.
The x0 repair is deliberately conservative and may warrant upstream review for hot-path performance. The FP CSR fix is architectural correctness and should not be gated behind an optimization flag.
Interpreter loop-fusion optimization work has been split out of this ACT PR and now lives on
codex/interpreter-loop-fusions(71a6666).Licensing
The ACT4 checkout is kept as a submodule. The local ACT tree documents code licensing as BSD-3-Clause or Apache-2.0, with documentation under CC-BY-4.0, and includes the corresponding license texts.
Testing
PKG_CONFIG=/usr/bin/pkg-config make -j4with JIT+T2CPKG_CONFIG=/usr/bin/pkg-config make ci_defconfig && PKG_CONFIG=/usr/bin/pkg-config make -j4GEM_HOME=$PWD/build/act-tools/gems/ruby/3.4.0 GEM_PATH=$PWD/build/act-tools/gems/ruby/3.4.0:/home/john/.local/share/gem/ruby/3.4.0 BUNDLE_PATH=$PWD/build/act-tools/gems PATH=$PWD/build/act-tools/gems/ruby/3.4.0/bin:/home/john/.local/share/gem/ruby/3.4.0/bin:/home/john/projects/github/rv32emu/.venv/bin:$PATH PKG_CONFIG=/usr/bin/pkg-config make act-user-run ACT_EXTENSIONS=I->ACT runner: 39/39 passedEarlier broad generated ACT batches were also checked with the direct runner:
tools/run-act-elfs.sh build/rv32emu-user build/act/rv32emu-rv32imafc/elfs I,M,F,Zicsr,Zicntr,Zifencei,Zca,Zcf,Misalign,MisalignZca,Zaamo->ACT runner: 182/182 passedtools/run-act-elfs.sh build/rv32emu-user build/act/rv32emu-rv32imafc/elfs F->ACT runner: 78/78 passedSummary by cubic
Adds ACT4 user-mode tests for rv32emu RV32IMAF(C), fixes FCSR/
x0correctness, and speeds up the interpreter with new loop fusions. CI runs stay deterministic, and ACT runs are filterable viaACT_EXTENSIONS.New Features
tests/riscv-actsubmodule, rv32emu config (Sail JSON, linker, YAML), andtools/run-act-elfs.sh; newact-user-elfs/act-user-runwithACT_EXTENSIONS; prefers Sail 0.11 viaACT_SAIL_BIN_DIR.dut_exe; separaterv32emu-userandrv32emu-system; env detection supports LLVM 18–21 (HAVE_LLVM), usestools/detect-env.pyfor SDL checks, and respectsPKG_CONFIG; toolchain detection addsriscv32-elf-/riscv64-elf-.Bug Fixes
x0=0in the interpreter loop and constant propagation; corrected RV32F CSR reads/writes forfflags,frm, andfcsr.riscv.c, SDL_mixer vars, and DTB dependency.Written for commit 67b9f80. Summary will update on new commits. Review in cubic