diff --git a/o1vm/src/interpreters/riscv32im/constraints.rs b/o1vm/src/interpreters/riscv32im/constraints.rs index 21d7ca1fce..c270bee34a 100644 --- a/o1vm/src/interpreters/riscv32im/constraints.rs +++ b/o1vm/src/interpreters/riscv32im/constraints.rs @@ -353,16 +353,6 @@ impl InterpreterEnv for Env { self.variable(position) } - unsafe fn mul_hi_lo( - &mut self, - _x: &Self::Variable, - _y: &Self::Variable, - position_hi: Self::Position, - position_lo: Self::Position, - ) -> (Self::Variable, Self::Variable) { - (self.variable(position_hi), self.variable(position_lo)) - } - unsafe fn divmod_signed( &mut self, _x: &Self::Variable, diff --git a/o1vm/src/interpreters/riscv32im/interpreter.rs b/o1vm/src/interpreters/riscv32im/interpreter.rs index 82d3b73c8d..cb399f8c61 100644 --- a/o1vm/src/interpreters/riscv32im/interpreter.rs +++ b/o1vm/src/interpreters/riscv32im/interpreter.rs @@ -1257,22 +1257,6 @@ pub trait InterpreterEnv { position: Self::Position, ) -> Self::Variable; - /// Returns `((x * y) >> 32, (x * y) & ((1 << 32) - 1))`, storing the results in `position_hi` - /// and `position_lo` respectively. - /// - /// # Safety - /// - /// There are no constraints on the returned values; callers must manually add constraints to - /// ensure that the pair of returned values correspond to the given values `x` and `y`, and - /// that they fall within the desired range. - unsafe fn mul_hi_lo( - &mut self, - x: &Self::Variable, - y: &Self::Variable, - position_hi: Self::Position, - position_lo: Self::Position, - ) -> (Self::Variable, Self::Variable); - /// Returns `(x / y, x % y)`, storing the results in `position_quotient` and /// `position_remainder` respectively. /// diff --git a/o1vm/src/interpreters/riscv32im/witness.rs b/o1vm/src/interpreters/riscv32im/witness.rs index 24cc710f46..10d6508721 100644 --- a/o1vm/src/interpreters/riscv32im/witness.rs +++ b/o1vm/src/interpreters/riscv32im/witness.rs @@ -501,25 +501,6 @@ impl InterpreterEnv for Env { res } - unsafe fn mul_hi_lo( - &mut self, - x: &Self::Variable, - y: &Self::Variable, - position_hi: Self::Position, - position_lo: Self::Position, - ) -> (Self::Variable, Self::Variable) { - let x: u32 = (*x).try_into().unwrap(); - let y: u32 = (*y).try_into().unwrap(); - let mul = (x as u64) * (y as u64); - let hi = (mul >> 32) as u32; - let lo = (mul & ((1 << 32) - 1)) as u32; - let hi = hi as u64; - let lo = lo as u64; - self.write_column(position_hi, hi); - self.write_column(position_lo, lo); - (hi, lo) - } - unsafe fn divmod_signed( &mut self, x: &Self::Variable,