diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-05 12:01:43 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-05 12:01:49 +0100 |
| commit | 48e28bfdc562303ab3b1f47d4f4dec3f973b9914 (patch) | |
| tree | 5863259239ef103793465767250c3bff48e696fe /src | |
| parent | 4278ca8b801491d3d31ac8b89c9c66a9dfe60c65 (diff) | |
| download | box64-48e28bfdc562303ab3b1f47d4f4dec3f973b9914.tar.gz box64-48e28bfdc562303ab3b1f47d4f4dec3f973b9914.zip | |
Adjusted 89 and 8B opcode to clear upper part of regs when ED is a reg
Diffstat (limited to 'src')
| -rwxr-xr-x | src/emu/x64run.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/emu/x64run.c b/src/emu/x64run.c index 478f87c5..13ec515e 100755 --- a/src/emu/x64run.c +++ b/src/emu/x64run.c @@ -283,7 +283,11 @@ x64emurun: if(rex.w) ED->q[0] = GD->q[0]; else - ED->dword[0] = GD->dword[0]; + //if ED is a reg, than the opcode works like movzx + if((nextop&0xC0)==0xC0) + ED->q[0] = GD->dword[0]; + else + ED->dword[0] = GD->dword[0]; break; case 0x8B: /* MOV Gd,Ed */ @@ -293,7 +297,11 @@ x64emurun: if(rex.w) GD->q[0] = ED->q[0]; else - GD->dword[0] = ED->dword[0]; + //if ED is a reg, than the opcode works like movzx + if((nextop&0xC0)==0xC0) + GD->q[0] = ED->dword[0]; + else + GD->dword[0] = ED->dword[0]; break; case 0x8D: /* LEA Gd,M */ |