Fix instruction cycle cost assertion check
This commit is contained in:
parent
34bbd72629
commit
78045adb57
2 changed files with 5 additions and 0 deletions
|
|
@ -1016,7 +1016,10 @@ CPU.prototype.setBurstCycles = function(nCycles)
|
|||
var nDelta = this.nStepCycles - nCycles;
|
||||
/*
|
||||
* NOTE: If nDelta is negative, we will actually be increasing nStepCycles and nBurstCycles.
|
||||
* Which is OK, but if we're also taking snapshots of the cycle counts, to make sure that instruction
|
||||
* costs are being properly assessed, then we need to update nSnapCycles as well.
|
||||
*/
|
||||
if (DEBUG) this.nSnapCycles -= nDelta;
|
||||
this.nStepCycles -= nDelta;
|
||||
this.nBurstCycles -= nDelta;
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue