From c1e67c31bc55afeaa4ec38bfdbb6f6a4f8e8b424 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Fri, 9 Jul 2021 11:48:57 +0200 Subject: Added F0 0F BA opcodes (for #21) --- src/emu/x64runf0.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) (limited to 'src') diff --git a/src/emu/x64runf0.c b/src/emu/x64runf0.c index 4c4d504d..f3c0fb10 100644 --- a/src/emu/x64runf0.c +++ b/src/emu/x64runf0.c @@ -405,6 +405,187 @@ int RunF0(x64emu_t *emu, rex_t rex) #endif break; + case 0xBA: + nextop = F8; + switch((nextop>>3)&7) { + case 4: /* BT Ed,Ib */ + CHECK_FLAGS(emu); + GETED(1); + tmp8u = F8; + if(rex.w) { + tmp8u&=63; + if(ED->q[0] & (1LL<dword[0] & (1<context->mutex_lock); + if(rex.w) { + tmp8u&=63; + if(ED->q[0] & (1LL<q[0] ^= (1LL<dword[0] & (1<dword[0] ^= (1<context->mutex_lock); +#endif + break; + case 6: /* BTR Ed, Ib */ + CHECK_FLAGS(emu); + GETED(1); + tmp8u = F8; +#ifdef DYNAREC + if(rex.w) { + do { + tmp8u&=63; + tmp64u = arm64_lock_read_dd(ED); + if(tmp64u & (1LL<context->mutex_lock); + if(rex.w) { + tmp8u&=63; + if(ED->q[0] & (1LL<q[0] ^= (1LL<dword[0] & (1<dword[0] ^= (1<context->mutex_lock); +#endif + break; + case 7: /* BTC Ed, Ib */ + CHECK_FLAGS(emu); + GETED(1); + tmp8u = F8; +#ifdef DYNAREC + if(rex.w) { + tmp8u&=63; + do { + tmp64u = arm64_lock_read_dd(ED); + if(tmp64u & (1LL<context->mutex_lock); + if(rex.w) { + tmp8u&=63; + if(ED->q[0] & (1LL<q[0] ^= (1LL<dword[0] & (1<dword[0] ^= (1<context->mutex_lock); +#endif + break; + + default: + return 1; + } + break; + case 0xC1: /* XADD Gd,Ed */ nextop = F8; GETED(0); -- cgit 1.4.1