Skip to content

Add signed and unsigned remainder operations for RISC-V semantics#160

Merged
automergerpr-permission-manager[bot] merged 3 commits into
masterfrom
jh/rem-remu
Aug 20, 2025
Merged

Add signed and unsigned remainder operations for RISC-V semantics#160
automergerpr-permission-manager[bot] merged 3 commits into
masterfrom
jh/rem-remu

Conversation

@Stevengre

Copy link
Copy Markdown
Contributor

Implement rules for REM and REMU instructions in riscv.md, detailing their behavior and special cases. Update syntax definitions in word.md to include remainder operations, and provide comprehensive handling for division by zero and overflow scenarios. Adjust test integration to utilize the rv32em architecture for relevant tests.

Close runtimeverification/zkevm-harness#80

Implement rules for `REM` and `REMU` instructions in `riscv.md`, detailing their behavior and special cases. Update syntax definitions in `word.md` to include remainder operations, and provide comprehensive handling for division by zero and overflow scenarios. Adjust test integration to utilize the `rv32em` architecture for relevant tests.
@Stevengre Stevengre self-assigned this Aug 20, 2025
Comment thread src/kriscv/kdist/riscv-semantics/word.md
Implement expected result calculations for `REM` and `REMU` operations in `test_functions.py`. Introduce new test cases to validate behavior according to RISC-V specifications, including handling of division by zero and signed overflow scenarios.

@tothtamas28 tothtamas28 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@automergerpr-permission-manager automergerpr-permission-manager Bot merged commit 389efd9 into master Aug 20, 2025
3 checks passed
@automergerpr-permission-manager automergerpr-permission-manager Bot deleted the jh/rem-remu branch August 20, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate adding REM, REMU to RISCV semantics

3 participants