From d6dd44da67baf80f0334db20e3ce948a3c8c411f Mon Sep 17 00:00:00 2001 From: lkcl Date: Tue, 26 Apr 2022 18:00:13 +0100 Subject: [PATCH] --- openpower/sv/biginteger/analysis.mdwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openpower/sv/biginteger/analysis.mdwn b/openpower/sv/biginteger/analysis.mdwn index 870263858..7c1f423e2 100644 --- a/openpower/sv/biginteger/analysis.mdwn +++ b/openpower/sv/biginteger/analysis.mdwn @@ -417,3 +417,7 @@ original algorithm detects overflow and manually places 0xffffffff (all ones) into `qhat`. It makes sense for `divrem2du` to do this, and also to return an overflow indicator: this can be done by always setting Rc=1 as a way to save opcode space + +Looking closely at the loop however we can see that overflow +will not occur. The initial value k is zero, and on subsequent iterations +new k, being the modulo, is always less than the divisor -- 2.30.2