about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/emu/x64run.c12
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 */