Changed the default DiskDump label, and cleaned up some jshint warnings

This commit is contained in:
Jeff Parsons 2015-04-22 12:21:06 -07:00 committed by jeffpar
commit 061cb7ea08
4 changed files with 25 additions and 15 deletions

View file

@ -206,21 +206,22 @@ X86.fnBOUND = function BOUND(dst, src)
*/
X86.fnBSF = function BSF(dst, src)
{
var n = 0;
if (!src) {
this.setZF();
} else {
this.clearZF();
var i = 0, bit = 0x1;
var bit = 0x1;
while (bit & this.dataMask) {
if (src & bit) {
dst = i;
dst = n;
break;
}
bit <<= 1;
i++;
n++; // TODO: Determine if n should be incremented before the bailout for an accurate cycle count
}
}
this.nStepCycles -= this.cycleCounts.nOpCyclesBitScan + i * 3;
this.nStepCycles -= this.cycleCounts.nOpCyclesBitScan + n * 3;
return dst;
};
@ -241,21 +242,23 @@ X86.fnBSF = function BSF(dst, src)
*/
X86.fnBSR = function BSR(dst, src)
{
var n = 0;
if (!src) {
this.setZF();
} else {
this.clearZF();
var i = (this.dataSize == 2? 15 : 31), j = i, bit = 1 << i;
var i = (this.dataSize == 2? 15 : 31), bit = 1 << i;
while (bit) {
if (src & bit) {
dst = i;
break;
}
bit >>>= 1;
i--;
n++; i--; // TODO: Determine if n should be incremented before the bailout for an accurate cycle count
}
}
this.nStepCycles -= this.cycleCounts.nOpCyclesBitScan + (j - i) * 3;
this.nStepCycles -= this.cycleCounts.nOpCyclesBitScan + n * 3;
return dst;
};

View file

@ -309,8 +309,6 @@ X86.opMOVcr = function MOVcr()
this.regCR3 = this.regEBX;
this.regEBX = temp;
break;
default:
break; // there IS no other case, but JavaScript inspections don't know that
}
};

View file

@ -152,6 +152,10 @@ X86Seg.prototype.loadProt = function loadProt(sel, fSuppress)
var addrDTLimit;
var cpu = this.cpu;
/*
* Some instructions (eg, CALLF) load a 32-bit value for the selector, while others (eg, LDS) do not;
* however, in ALL cases, only the low 16 bits are significant.
*/
sel &= 0xffff;
if (!(sel & X86.SEL.LDT)) {