diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64run0f.c | 12 | ||||
| -rw-r--r-- | src/emu/x64run660f.c | 12 |
2 files changed, 16 insertions, 8 deletions
diff --git a/src/emu/x64run0f.c b/src/emu/x64run0f.c index 4af95885..92de2706 100644 --- a/src/emu/x64run0f.c +++ b/src/emu/x64run0f.c @@ -1613,7 +1613,8 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) } else { SET_FLAG(F_ZF); } - GD->q[0] = tmp8u; + if(tmp64u || !MODREG) + GD->q[0] = tmp8u; } else { tmp32u = ED->dword[0]; if(tmp32u) { @@ -1622,7 +1623,8 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) } else { SET_FLAG(F_ZF); } - GD->q[0] = tmp8u; + if(tmp32u || !MODREG) + GD->q[0] = tmp8u; } if(!BOX64ENV(cputype)) { CONDITIONAL_SET_FLAG(PARITY(tmp8u), F_PF); @@ -1647,7 +1649,8 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) } else { SET_FLAG(F_ZF); } - GD->q[0] = tmp8u; + if(tmp64u || !MODREG) + GD->q[0] = tmp8u; } else { tmp32u = ED->dword[0]; if(tmp32u) { @@ -1657,7 +1660,8 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) GD->q[0] = tmp8u; } else { SET_FLAG(F_ZF); - GD->q[0] = tmp8u; + if(!MODREG) + GD->q[0] = tmp8u; } } if(!BOX64ENV(cputype)) { diff --git a/src/emu/x64run660f.c b/src/emu/x64run660f.c index 7232c0c5..5129bc7b 100644 --- a/src/emu/x64run660f.c +++ b/src/emu/x64run660f.c @@ -2110,7 +2110,8 @@ uintptr_t Run660F(x64emu_t *emu, rex_t rex, uintptr_t addr) } else { SET_FLAG(F_ZF); } - GW->q[0] = tmp8u; + if(tmp64u || !MODREG) + GW->q[0] = tmp8u; } else { tmp16u = EW->word[0]; if(tmp16u) { @@ -2119,7 +2120,8 @@ uintptr_t Run660F(x64emu_t *emu, rex_t rex, uintptr_t addr) } else { SET_FLAG(F_ZF); } - GW->word[0] = tmp8u; + if(tmp16u || !MODREG) + GW->word[0] = tmp8u; } if(!BOX64ENV(cputype)) { CONDITIONAL_SET_FLAG(PARITY(tmp8u), F_PF); @@ -2144,7 +2146,8 @@ uintptr_t Run660F(x64emu_t *emu, rex_t rex, uintptr_t addr) } else { SET_FLAG(F_ZF); } - GW->q[0] = tmp8u; + if(tmp64u || !MODREG) + GW->q[0] = tmp8u; } else { tmp16u = EW->word[0]; if(tmp16u) { @@ -2154,7 +2157,8 @@ uintptr_t Run660F(x64emu_t *emu, rex_t rex, uintptr_t addr) } else { SET_FLAG(F_ZF); } - GW->word[0] = tmp8u; + if(tmp16u || !MODREG) + GW->word[0] = tmp8u; } if(!BOX64ENV(cputype)) { CONDITIONAL_SET_FLAG(PARITY(tmp8u), F_PF); |