diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-02-02 16:25:57 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-02-02 16:25:57 +0100 |
| commit | a4ffa3de7ac52dd8acfd3df863095f1651f6d93b (patch) | |
| tree | 8033e672a6cc6f57138ee27e3cd7b29f55991a5d /src/emu | |
| parent | dd111f55f6e846be683b248cd8d76cdc1c621f12 (diff) | |
| download | box64-a4ffa3de7ac52dd8acfd3df863095f1651f6d93b.tar.gz box64-a4ffa3de7ac52dd8acfd3df863095f1651f6d93b.zip | |
Added F0 FE /1 and /2 opcodes ([DYNAREC] too) (for #505)
Diffstat (limited to 'src/emu')
| -rw-r--r-- | src/emu/x64runf0.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/emu/x64runf0.c b/src/emu/x64runf0.c index 6dd80657..00b524ac 100644 --- a/src/emu/x64runf0.c +++ b/src/emu/x64runf0.c @@ -938,6 +938,39 @@ uintptr_t RunF0(x64emu_t *emu, rex_t rex, uintptr_t addr) } break; + case 0xFE: /* GRP 5 Eb */ + nextop = F8; + GETED(0); + switch((nextop>>3)&7) { + case 0: /* INC Eb */ +#ifdef DYNAREC + do { + tmp8u = native_lock_read_b(ED); + } while(native_lock_write_b(ED, inc8(emu, tmp8u))); +#else + pthread_mutex_lock(&emu->context->mutex_lock); + ED->byte[0] = inc8(emu, ED->byte[0]); + pthread_mutex_unlock(&emu->context->mutex_lock); +#endif + break; + case 1: /* DEC Ed */ +#ifdef DYNAREC + do { + tmp8u = native_lock_read_b(ED); + } while(native_lock_write_b(ED, dec8(emu, tmp8u))); +#else + pthread_mutex_lock(&emu->context->mutex_lock); + ED->byte[0] = dec8(emu, ED->byte[0]); + pthread_mutex_unlock(&emu->context->mutex_lock); +#endif + break; + default: + printf_log(LOG_NONE, "Illegal Opcode 0xF0 0xFE 0x%02X 0x%02X\n", nextop, PK(0)); + emu->quit=1; + emu->error |= ERR_ILLEGAL; + break; + } + break; case 0xFF: /* GRP 5 Ed */ nextop = F8; GETED(0); |