diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-04-03 16:41:59 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-04-03 16:43:01 +0200 |
| commit | b40195d26dc2d245cbc44a84cc998860e2dd49d8 (patch) | |
| tree | 2ceb980731bfd2cd7c48b3bf7956c844c8da29f5 /src | |
| parent | 316abec6939dfa5b858ce3024cfb816aba0bae2f (diff) | |
| download | box64-b40195d26dc2d245cbc44a84cc998860e2dd49d8.tar.gz box64-b40195d26dc2d245cbc44a84cc998860e2dd49d8.zip | |
[INTERPRETER] Added aligned path to F0 0F C7 opcode
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64runf0.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/emu/x64runf0.c b/src/emu/x64runf0.c index e62237a0..f215a2d2 100644 --- a/src/emu/x64runf0.c +++ b/src/emu/x64runf0.c @@ -760,6 +760,26 @@ uintptr_t RunF0(x64emu_t *emu, rex_t rex, uintptr_t addr) } native_lock_xchg_d(&emu->context->mutex_16b, 0); // unlock #else + if(((uintptr_t)ED)&0xf) { + do { + native_lock_read_b(ED); + tmp64u = ED->q[0]; + tmp64u2 = ED->q[1]; + if(R_RAX == tmp64u && R_RDX == tmp64u2) { + SET_FLAG(F_ZF); + tmp32s = native_lock_write_b(ED, emu->regs[_BX].byte[0]); + if(!tmp32s) { + ED->q[0] = R_RBX; + ED->q[1] = R_RCX; + } + } else { + CLEAR_FLAG(F_ZF); + R_RAX = tmp64u; + R_RDX = tmp64u2; + tmp32s = 0; + } + } while(tmp32s); + } else do { native_lock_read_dq(&tmp64u, &tmp64u2, ED); if(R_RAX == tmp64u && R_RDX == tmp64u2) { @@ -774,6 +794,23 @@ uintptr_t RunF0(x64emu_t *emu, rex_t rex, uintptr_t addr) } while(tmp32s); #endif } else + if(((uintptr_t)ED)&0x7) { + do { + native_lock_get_b(ED); + tmp64u = ED->q[0]; + if((R_EAX == (tmp64u&0xffffffff)) && (R_EDX == ((tmp64u>>32)&0xffffffff))) { + SET_FLAG(F_ZF); + tmp32s = native_lock_write_b(ED, emu->regs[_BX].byte[0]); + if(!tmp32s) + ED->q[0] = R_EBX|(((uint64_t)R_ECX)<<32); + } else { + CLEAR_FLAG(F_ZF); + R_RAX = tmp64u&0xffffffff; + R_RDX = (tmp64u>>32)&0xffffffff; + tmp32s = 0; + } + } while(tmp32s); + } else do { tmp64u = native_lock_read_dd(ED); if((R_EAX == (tmp64u&0xffffffff)) && (R_EDX == ((tmp64u>>32)&0xffffffff))) { |