From 416c5401fcf4ca566d9ea74b826d2eeb28d58dce Mon Sep 17 00:00:00 2001 From: lkcl Date: Tue, 19 Apr 2022 18:17:35 +0100 Subject: [PATCH] --- openpower/sv/biginteger.mdwn | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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: + -- 2.30.2