Added a temporary fix to PUSH operations to ensure that 16-bit pushes wrap around 64K boundaries (TODO: a 16-bit PUSH at offset 0x0001 or a POP at offset 0xFFFF must either wrap or fault as appropriate)
This commit is contained in:
parent
6c6f28c1ef
commit
308bd75af4
10 changed files with 205 additions and 184 deletions
|
|
@ -3836,7 +3836,7 @@ class X86CPU extends CPU {
|
|||
* if the result is negative, we need only be concerned if the signs of both numbers are the same
|
||||
* (ie, the sign of their XOR'ed union is positive).
|
||||
*/
|
||||
if (((regLSP - this.regLSPLimitLow)|0) < 0 && (this.regLSPLimitLow ^ regLSP) >= 0) {
|
||||
if (((regLSP - this.regLSPLimitLow)|0) < 0 && (this.regLSPLimitLow ^ this.regLSP) >= 0) {
|
||||
/*
|
||||
* There's no such thing as an SS fault on the 8086/8088, and I'm assuming that, on newer
|
||||
* processors, when the stack segment limit is set to the maximum, it's OK for the stack to wrap.
|
||||
|
|
@ -3897,7 +3897,7 @@ class X86CPU extends CPU {
|
|||
* if the result is negative, we need only be concerned if the signs of both numbers are the same
|
||||
* (ie, the sign of their XOR'ed union is positive).
|
||||
*/
|
||||
if (((regLSP - this.regLSPLimitLow)|0) < 0 && (this.regLSPLimitLow ^ regLSP) >= 0) {
|
||||
if (((regLSP - this.regLSPLimitLow)|0) < 0 && (this.regLSPLimitLow ^ this.regLSP) >= 0) {
|
||||
/*
|
||||
* There's no such thing as an SS fault on the 8086/8088, and I'm assuming that, on newer
|
||||
* processors, when the stack segment limit is set to the maximum, it's OK for the stack to wrap.
|
||||
|
|
|
|||
Loading…
Reference in a new issue