From: lkcl Date: Tue, 19 Apr 2022 17:17:35 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~2694 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=416c5401fcf4ca566d9ea74b826d2eeb28d58dce;p=libreriscv.git --- diff --git a/openpower/sv/biginteger.mdwn b/openpower/sv/biginteger.mdwn index 670c8dc24..9a7fb0388 100644 --- a/openpower/sv/biginteger.mdwn +++ b/openpower/sv/biginteger.mdwn @@ -90,4 +90,15 @@ purpose. RT = lowerhalf(product) RC = upperhalf(product) -Successive iterations effectively use RC as a 64-bit carry. +Successive iterations effectively use RC as a 64-bit carry, and +as noted by Intel in their notes on mulx, +RA*RB+RC+RD cannot overflow, so does not require +setting an additional CA flag. + +## Divide + +The simplest implementation of big-int divide is the standard textbook +"Long Division", set with RADIX 64 instead of Base 10. Donald Knuth's +Algorithm D performs estimates which, if wrong, are compensated for +afterwards. Essentially however there are three phases: +