addressed comments

This commit is contained in:
Nicholas Ward 2023-03-14 12:18:16 -07:00
parent 6f05a144cb
commit 9e7dc7ca79
2 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,8 @@
// Arithmetic on little-endian integers represented with 128-bit limbs.
// All integers must be under a given length bound, and are padded with leading zeroes.
// Returns a >= b.
// Compares two bignums of the same given length. Assumes that len > 0.
// Returns 1 if a > b, 3 if a == b, and 0 if a < b.
global ge_bignum:
// stack: len, a_start_loc, b_start_loc, retdest
SWAP1

View File

@ -3,6 +3,10 @@
global iszero_bignum:
// stack: len, start_loc, retdest
DUP1
// stack: len, len, start_loc, retdest
ISZERO
%jumpi(eqzero)
DUP2
// stack: start_loc, len, start_loc, retdest
ADD