Added code to help identify instances where multiplication constants should be checked against other sources for accuracy

This commit is contained in:
Jeff 2017-04-01 11:08:44 -07:00 committed by Jeff Parsons
commit 46ed7c77e8
4 changed files with 386 additions and 3 deletions

View file

@ -6326,6 +6326,8 @@ PDP10.doDIV = function(dst, ext, src)
* PDP-10 "DAKAK" Diagnostic Notes
* -------------------------------
*
* The DAKAK diagnostic contains the following code:
*
* 036174: 200240 043643 MOVE 5,43643 ; [43643] = 400000000000
* 036175: 200300 043603 MOVE 6,43603 ; [43603] = 777777777777
* 036176: 200140 043604 MOVE 3,43604 ; [43604] = 000000000001

View file

@ -519,7 +519,16 @@ class DebuggerPDP10 extends Debugger {
*/
evalMUL(dst, src)
{
return PDP10.doMUL.call(this.cpu, dst, src, false, true);
var result = PDP10.doMUL.call(this.cpu, dst, src, false, true);
if (MAXDEBUG) {
var resultJS = this.truncate(dst * src);
if (resultJS !== result) {
var sReference = this.macro10? (" @" + this.toStrBase(this.macro10.nLocation)) : "";
var sResults = "PDP-10: " + this.toStrBase(result, 36) + " JavaScript: " + this.toStrBase(resultJS, 36);
this.println("MUL(" + this.toStrBase(dst, 36) + "," + this.toStrBase(src, 36) + ") " + sResults + sReference);
}
}
return result;
}
/**