Skip to content

Commit

Permalink
Rename bigUIntOrWith1 to bigUintInPlaceOrWith1
Browse files Browse the repository at this point in the history
  • Loading branch information
fkrause98 committed Oct 5, 2023
1 parent 8409032 commit a19ba3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions precompiles/Modexp.yul
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ object "ModExp" {
/// @dev It consumes constant time, aka `O(1)`.
/// @param basePtr Base pointer for a big unsigned integer.
/// @param nLimbs Number of 32 Byte limbs composing the big unsigned integer.
function bigUIntOrWith1(basePtr, nLimbs) {
function bigUIntInPlaceOrWith1(basePtr, nLimbs) {
let offset := mul(sub(nLimbs, 1), 32)
let limbPtr := add(basePtr, offset)
let limb := mload(limbPtr)
Expand Down Expand Up @@ -558,7 +558,7 @@ object "ModExp" {
}

copyBigUint(n_limbs, quotient_ptr, r_ptr) // r = quotient
bigUIntOrWith1(r_ptr, n_limbs) // r = quotient | 1
bigUIntInPlaceOrWith1(r_ptr, n_limbs) // r = quotient | 1

if iszero(borrow) {
copyBigUint(n_limbs, r_ptr, quotient_ptr)
Expand Down

0 comments on commit a19ba3f

Please sign in to comment.