BOUND fixes
This commit is contained in:
parent
f3646d206f
commit
3a1d05d541
4 changed files with 377 additions and 359 deletions
|
|
@ -78,7 +78,7 @@
|
||||||
"debugger": {
|
"debugger": {
|
||||||
"id": "pc386.debugger",
|
"id": "pc386.debugger",
|
||||||
"name": "",
|
"name": "",
|
||||||
"commands": "",
|
"commands": "bp 0010:829B;g",
|
||||||
"messages": ""
|
"messages": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -172,9 +172,14 @@ X86.fnBOUND = function BOUND(dst, src)
|
||||||
/*
|
/*
|
||||||
* Note that BOUND performs signed comparisons, so we must transform all arguments into signed values.
|
* Note that BOUND performs signed comparisons, so we must transform all arguments into signed values.
|
||||||
*/
|
*/
|
||||||
var wIndex = (dst << 16) >> 16;
|
var wIndex = dst;
|
||||||
var wLower = (this.getWord(this.regEA) << 16) >> 16;
|
var wLower = this.getWord(this.regEA);
|
||||||
var wUpper = (this.getWord(this.regEA + this.dataSize) << 16) >> 16;
|
var wUpper = this.getWord(this.regEA + this.dataSize);
|
||||||
|
if (this.dataSize == 2) {
|
||||||
|
wIndex = (dst << 16) >> 16;
|
||||||
|
wLower = (wLower << 16) >> 16;
|
||||||
|
wUpper = (wUpper << 16) >> 16;
|
||||||
|
}
|
||||||
this.nStepCycles -= this.cycleCounts.nOpCyclesBound;
|
this.nStepCycles -= this.cycleCounts.nOpCyclesBound;
|
||||||
if (wIndex < wLower || wIndex > wUpper) {
|
if (wIndex < wLower || wIndex > wUpper) {
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -290,11 +290,11 @@ toProt32:
|
||||||
cmp eax,[0x0000]
|
cmp eax,[0x0000]
|
||||||
err1: jne err1
|
err1: jne err1
|
||||||
mov [0x0000],edx ; restore the DWORD at 0x0000:0x0000 from EDX
|
mov [0x0000],edx ; restore the DWORD at 0x0000:0x0000 from EDX
|
||||||
|
jmp test2
|
||||||
;
|
;
|
||||||
; Test moving a byte to a 32-bit register with sign-extension
|
; Test moving a byte to a 32-bit register with sign-extension
|
||||||
;
|
;
|
||||||
movsx eax,byte [0xfffff]
|
test2: movsx eax,byte [0xfffff]
|
||||||
cmp eax,0xffffff80
|
cmp eax,0xffffff80
|
||||||
err2: jne err2
|
err2: jne err2
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue