diff --git a/evm/src/cpu/kernel/asm/curve/bn254/curve_arithmetic/curve_add.asm b/evm/src/cpu/kernel/asm/curve/bn254/curve_arithmetic/curve_add.asm index dae060c2..f62c7ed8 100644 --- a/evm/src/cpu/kernel/asm/curve/bn254/curve_arithmetic/curve_add.asm +++ b/evm/src/cpu/kernel/asm/curve/bn254/curve_arithmetic/curve_add.asm @@ -83,7 +83,7 @@ global ec_add_valid_points: // stack: x0, x1, y0 - y1, x0, y0, x1, y1, retdest %submod // stack: x0 - x1, y0 - y1, x0, y0, x1, y1, retdest - %moddiv + %divfp254 // stack: lambda, x0, y0, x1, y1, retdest %jump(ec_add_valid_points_with_lambda) @@ -201,7 +201,7 @@ ec_add_equal_points: // stack: 3/2 * x0^2, x0, y0, x1, y1, retdest DUP3 // stack: y0, 3/2 * x0^2, x0, y0, x1, y1, retdest - %moddiv + %divfp254 // stack: lambda, x0, y0, x1, y1, retdest %jump(ec_add_valid_points_with_lambda) diff --git a/evm/src/cpu/kernel/asm/curve/bn254/field_arithmetic/moddiv.asm b/evm/src/cpu/kernel/asm/curve/bn254/field_arithmetic/moddiv.asm index fd54fe2a..09d7d336 100644 --- a/evm/src/cpu/kernel/asm/curve/bn254/field_arithmetic/moddiv.asm +++ b/evm/src/cpu/kernel/asm/curve/bn254/field_arithmetic/moddiv.asm @@ -1,7 +1,7 @@ /// Division modulo 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47, the BN254 base field order // Returns y * (x^-1) where the inverse is taken modulo N -%macro moddiv +%macro divfp254 // stack: x , y %inverse // stack: x^-1, y