Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Commit

Permalink
Fixed the command-line (Node) version of PCjs
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffpar committed Dec 30, 2014
1 parent 3172912 commit 55cb185
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 50 deletions.
8 changes: 4 additions & 4 deletions modules/pcjs/bin/x86gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ function genMode(d, w, mrm, sGroup, sRO) {
break;
case 4:
sRegGet = "this.regSP";
sRegBTLo = "X86CPU.BACKTRACK.SP_LO";
sRegBTHi = "X86CPU.BACKTRACK.SP_HI";
sRegBTLo = "X86.BACKTRACK.SP_LO";
sRegBTHi = "X86.BACKTRACK.SP_HI";
break;
case 5:
sRegGet = "this.regBP";
Expand Down Expand Up @@ -616,8 +616,8 @@ function genMode(d, w, mrm, sGroup, sRO) {
break;
case 4:
sModRegGet = "this.regSP";
sModRegBTLo = "X86CPU.BACKTRACK.SP_LO";
sModRegBTHi = "X86CPU.BACKTRACK.SP_HI";
sModRegBTLo = "X86.BACKTRACK.SP_LO";
sModRegBTHi = "X86.BACKTRACK.SP_HI";
break;
case 5:
sModRegGet = "this.regBP";
Expand Down
1 change: 1 addition & 0 deletions modules/pcjs/lib/defines.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ if (typeof module !== 'undefined') {
global.EAFUNCS = EAFUNCS;
global.FATARRAYS = FATARRAYS;
global.TYPEDARRAYS = TYPEDARRAYS;
global.BACKTRACK = BACKTRACK;
global.SAMPLER = SAMPLER;
/*
* TODO: When we're "required" by Node, should we return anything via module.exports?
Expand Down
7 changes: 7 additions & 0 deletions modules/pcjs/lib/x86.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,13 @@ var X86 = {
}
};

if (BACKTRACK) {
X86.BACKTRACK = {
SP_LO: 0,
SP_HI: 0
};
}

/*
* Some PS flags are stored directly in regPS, hence the "direct" designation.
*/
Expand Down
7 changes: 0 additions & 7 deletions modules/pcjs/lib/x86cpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,13 +429,6 @@ X86CPU.PREFETCH = {
MASK: 0x7 // (X86CPU.PREFETCH.ARRAY - 1)
};

if (BACKTRACK) {
X86CPU.BACKTRACK = {
SP_LO: 0,
SP_HI: 0
};
}

/**
* initMemory(aMemBlocks, addrLimit, blockShift, blockLimit, blockMask)
*
Expand Down
Loading

0 comments on commit 55cb185

Please sign in to comment.