Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/contracts/core/ab-contract-file/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
const_default,
const_index,
const_trait_impl,
maybe_uninit_fill,
trusted_len,
const_try,
const_try_residual,
try_blocks,
widening_mul
maybe_uninit_fill,
signed_bigint_helpers,
trusted_len,
try_blocks
)]
#![expect(incomplete_features, reason = "generic_const_exprs")]
// TODO: This feature is not actually used in this crate, but is added as a workaround for
Expand Down
4 changes: 2 additions & 2 deletions crates/execution/ab-riscv-act4-runner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
const_try_residual,
generic_const_exprs,
iter_array_chunks,
try_blocks,
widening_mul
signed_bigint_helpers,
try_blocks
)]

mod abundance_rv32i_max;
Expand Down
4 changes: 2 additions & 2 deletions crates/execution/ab-riscv-coremark-runner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
const_trait_impl,
const_try,
const_try_residual,
try_blocks,
widening_mul
signed_bigint_helpers,
try_blocks
)]
#![expect(incomplete_features, reason = "generic_const_exprs")]
// TODO: This feature is not actually used in this crate, but is added as a workaround for
Expand Down
2 changes: 1 addition & 1 deletion crates/execution/ab-riscv-interpreter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
const_trait_impl,
generic_const_exprs,
result_option_map_or_default,
widening_mul
signed_bigint_helpers
)]
#![cfg_attr(
not(any(
Expand Down
4 changes: 2 additions & 2 deletions crates/execution/ab-riscv-interpreter/src/rv32/m.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ where
Ok(ControlFlow::Continue((rd, value)))
}
Self::Mulh { rd, rs1: _, rs2: _ } => {
// Signed × signed: widen to i64, take upper 32 bits
// Signed × signed: multiply and take upper 32 bits
let (_lo, prod) = rs1_value
.cast_signed()
.widening_mul(rs2_value.cast_signed());
.carrying_mul(rs2_value.cast_signed(), 0);
Ok(ControlFlow::Continue((rd, prod.cast_unsigned())))
}
Self::Mulhsu { rd, rs1: _, rs2: _ } => {
Expand Down
4 changes: 2 additions & 2 deletions crates/execution/ab-riscv-interpreter/src/rv64/m.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ where
Ok(ControlFlow::Continue((rd, value)))
}
Self::Mulh { rd, rs1: _, rs2: _ } => {
// Signed × signed: widen to i128, take upper 64 bits
// Signed × signed: multiply and take upper 64 bits
let (_lo, prod) = rs1_value
.cast_signed()
.widening_mul(rs2_value.cast_signed());
.carrying_mul(rs2_value.cast_signed(), 0);
Ok(ControlFlow::Continue((rd, prod.cast_unsigned())))
}
Self::Mulhsu { rd, rs1: _, rs2: _ } => {
Expand Down
2 changes: 1 addition & 1 deletion crates/execution/ab-riscv-interpreter/src/rv64/m/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn test_mulh() {

execute(&mut state).unwrap();

let (_, hi) = i64::MAX.widening_mul(2);
let (_, hi) = i64::MAX.carrying_mul(2, 0);
assert_eq!(state.regs.read(Reg::A2), hi.cast_unsigned());
}

Expand Down
Loading