Skip to content

feat: rv64 alu lt shift#2461

Merged
876pol merged 8 commits intodevelop-v1.8.0from
rv64-alu-lt-shift
Mar 4, 2026
Merged

feat: rv64 alu lt shift#2461
876pol merged 8 commits intodevelop-v1.8.0from
rv64-alu-lt-shift

Conversation

@876pol
Copy link
Copy Markdown
Contributor

@876pol 876pol commented Feb 24, 2026

Towards INT-6319.

Summary:

  • base_alu, less_than, and shift submodules of riscv have been ported from RV32 to RV64
    • All types/structs renamed from Rv32* to Rv64* (e.g., Rv32BaseAluAdapterAirRv64BaseAluAdapterAir)
    • Operand width changed from u32/4 bytes to u64/8 bytes throughout (registers, ALU ops, compose/decompose helpers)
  • Rv64BaseAluAdapter (shared by all three submodules) updated for RV64
    • New constraints added to enforce bytes 3–7 all equal the sign byte for correct 64-bit sign extension (previously only byte 3 was constrained for 32-bit)
    • Added tests for the above constraint in base_alu, less_than, shift.
  • Changed constant DEFAULT_U8_BLOCK_SIZE from 4 to 8 (matching RV64 register width)
  • Commented out unported code in extension/mod.rs and lib.rs (load/store, branch, jal/jalr, auipc, mul/div — all marked TEMP: disabled until ported to RV64) with manual empty-enum trait impls to keep the crate compiling
  • Updated test_utils.rs to use RV64 conventions (generate_rv64_is_type_immediate, rv64_rand_write_register_or_imm)

@876pol 876pol marked this pull request as ready for review February 27, 2026 16:18
@876pol 876pol force-pushed the rv64-move-rv32-crate branch from bfa3808 to 609552b Compare March 3, 2026 15:19
Base automatically changed from rv64-move-rv32-crate to develop-v1.8.0 March 3, 2026 15:20
@876pol 876pol force-pushed the rv64-alu-lt-shift branch from 8051c30 to a0966b7 Compare March 3, 2026 21:58
Towards INT-6319.

Summary:
- `branch_eq` and `branch_lt` submodules of `riscv` have been ported
from RV32 to RV64
- All types/structs renamed from `Rv32*` to `Rv64*` (e.g.,
`Rv32BranchAdapterAir` → `Rv64BranchAdapterAir`)
- Operand width changed from `u32`/4 bytes to `u64`/8 bytes throughout
(registers, comparisons)
- `Rv64BranchAdapter` (shared by `branch_eq` and `branch_lt`) updated
for RV64
- Uncommented `branch_eq` and `branch_lt` in `extension/mod.rs` and
`lib.rs` (previously marked `TEMP: disabled until ported to RV64`)
- Updated tests to use RV64 conventions (8-byte arrays,
`RV64_REGISTER_NUM_LIMBS`, `RV64_CELL_BITS`)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@876pol 876pol merged commit 9fd3274 into develop-v1.8.0 Mar 4, 2026
6 of 63 checks passed
@876pol 876pol deleted the rv64-alu-lt-shift branch March 4, 2026 19:21
shuklaayush pushed a commit that referenced this pull request Apr 27, 2026
Towards INT-6319.

Summary:
- `base_alu`, `less_than`, and `shift` submodules of `riscv` have been
ported from RV32 to RV64
- All types/structs renamed from `Rv32*` to `Rv64*` (e.g.,
`Rv32BaseAluAdapterAir` → `Rv64BaseAluAdapterAir`)
- Operand width changed from `u32`/4 bytes to `u64`/8 bytes throughout
(registers, ALU ops, compose/decompose helpers)
- `Rv64BaseAluAdapter` (shared by all three submodules) updated for RV64
- New constraints added to enforce bytes 3–7 all equal the sign byte for
correct 64-bit sign extension (previously only byte 3 was constrained
for 32-bit)
- Added tests for the above constraint in `base_alu`, `less_than`,
`shift`.
- Changed constant `DEFAULT_U8_BLOCK_SIZE` from 4 to 8 (matching RV64
register width)
- Commented out unported code in `extension/mod.rs` and `lib.rs`
(load/store, branch, jal/jalr, auipc, mul/div — all marked `TEMP:
disabled until ported to RV64`) with manual empty-enum trait impls to
keep the crate compiling
- Updated `test_utils.rs` to use RV64 conventions
(`generate_rv64_is_type_immediate`, `rv64_rand_write_register_or_imm`)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants