diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-26 12:18:14 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-26 12:18:14 +0100 |
| commit | 870e0872c0990dbb0c63f452a2b85acc3e02294f (patch) | |
| tree | 3b800b0fdf443790c9a9f4dca0027afdc377a0d0 /src | |
| parent | 2874e3099197b1f8a2cfe31dbe79225aac312cc6 (diff) | |
| download | box64-870e0872c0990dbb0c63f452a2b85acc3e02294f.tar.gz box64-870e0872c0990dbb0c63f452a2b85acc3e02294f.zip | |
Added F0 0F B0 opcode
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64runf0.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/emu/x64runf0.c b/src/emu/x64runf0.c index 48eee438..49a0283f 100644 --- a/src/emu/x64runf0.c +++ b/src/emu/x64runf0.c @@ -168,7 +168,33 @@ int RunF0(x64emu_t *emu, rex_t rex) opcode = F8; switch (opcode) { - case 0xB1: /* CMPXCHG Ed,Gd */ + case 0xB0: /* CMPXCHG Eb,Gb */ + CHECK_FLAGS(emu); + nextop = F8; + GETGB; + GETEB(0); +#ifdef DYNAREC + do { + tmp8u = arm64_lock_read_b(EB); + cmp8(emu, R_AL, tmp8u); + if(ACCESS_FLAG(F_ZF)) { + tmp32s = arm64_lock_write_b(EB, GB); + } else { + R_AL = tmp8u; + tmp32s = 0; + } + } while(tmp32s); +#else + pthread_mutex_lock(&emu->context->mutex_lock); + cmp8(emu, R_AL, EB->byte[0]); + if(ACCESS_FLAG(F_ZF)) { + EB->byte[0] = GB; + } else { + R_AL = EB->byte[0]; + } + pthread_mutex_unlock(&emu->context->mutex_lock); +#endif + break; case 0xB1: /* CMPXCHG Ed,Gd */ nextop = F8; GETED(0); GETGD; |