--- pgp/src/mc68020.s 2018/04/24 16:38:47 1.1 +++ pgp/src/mc68020.s 2018/04/24 16:40:22 1.1.1.2 @@ -7,6 +7,7 @@ | P_DMUL replaces mp_smul and mp_dmul in mpilib.c | | 92.9.21 - Tsutomu Shimomura, tsutomu@ucsd.edu +| 93.5.14 - Bug in P_DMUL fixed -- now works with small bignums .text @@ -233,21 +234,26 @@ _P_DMUL: movw d0, d7 | count for multiplicand movl a1, a3 | multiplicand - bra 2f + tstl a3@+ + bne 2f + subqw #1, d7 1: clrl a4@+ -2: tstl a3@+ - dbne d7, 1b | d7 contains effective size of the multiplicand-2 - + dbne d7, 1b + addqw #1, d7 | d7 contains effective size of the multiplicand-2 +2: movl d0, d6 | count for multiplier movl a2, a3 | multiplier - bra 2f + tstl a3@+ + bne 2f + subqw #1, d6 1: clrl a4@+ -2: tstl a3@+ - dbne d6, 1b | d6 contains effective size of the multiplier-2 + dbne d6, 1b + addqw #1, d6 | d6 contains effective size of the multiplier-2 +2: addqw #1, d0 | global_precision - 1 lslw #2, d0