Preliminary groundwork for FPU support

This commit is contained in:
Jeff Parsons 2015-11-11 18:11:30 -08:00
commit 0c6db1df46
18 changed files with 756 additions and 173 deletions

View file

@ -75,8 +75,8 @@ if (!I386) {
*
* The X86CPU class uses the following (parmsCPU) properties:
*
* model: a number (eg, 8088) that should match one of the X86.MODEL values
* stepping: a string (eg, "B1") that should match one of the X86.STEPPING values
* model: a number (eg, 8088) that should match one of the X86.MODEL values (default is 8088)
* stepping: a string (eg, "B1") that should match one of the X86.STEPPING values (default is "")
*
* This extends the CPU class and passes any remaining parmsCPU properties to the CPU class
* constructor, along with a default speed (cycles per second) based on the specified (or default)
@ -1070,6 +1070,12 @@ X86CPU.prototype.resetRegs = function()
this.regMDLo = this.regMDHi = 0;
this.regXX = 0; // internal register for segment register and control register moves
/*
* This internal "register" is set in selected opcode handlers to record the original opcode; ordinarily,
* we dispatch on the opcode but never save it, because it's rarely needed.
*/
this.bOpcode = 0;
/*
* Another internal "register" we occasionally need is an interim copy of bModRM, set inside selected opcode
* handlers so that the helper function can have access to the instruction's bModRM without resorting to a