summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib
diff options
context:
space:
mode:
authorjsing <>2023-01-28 16:33:34 +0000
committerjsing <>2023-01-28 16:33:34 +0000
commit636918f6cfde69d37b71f6ff3da1a6eb6cf4ad65 (patch)
tree77285c9d112391ced3ea1c6ee831bf186ff9316b /src/lib/libc/stdlib
parent971c759a469620704a18f7c93e7d71fbae75e7c2 (diff)
downloadopenbsd-636918f6cfde69d37b71f6ff3da1a6eb6cf4ad65.tar.gz
openbsd-636918f6cfde69d37b71f6ff3da1a6eb6cf4ad65.tar.bz2
openbsd-636918f6cfde69d37b71f6ff3da1a6eb6cf4ad65.zip
Provide bn_div_rem_words() and make use of it.
Provide a function that divides a double word (h:l) by d, returning the quotient q and the remainder r, such that q * d + r is equal to the numerator. Call this from the three places that currently implement this themselves. This is implemented with some slight indirection, which allows for per architecture implementations, replacing the define/macro tangle, which messes with variables that are not passed to it. Also remove a duplicate of bn_div_words() for the BN_ULLONG && BN_DIV2W case - this is already handled. ok tb@
Diffstat (limited to 'src/lib/libc/stdlib')
0 files changed, 0 insertions, 0 deletions