Added F3 0F B8 opcode

This commit is contained in:
ptitSeb 2023-11-08 11:38:53 +01:00
parent 0c2d9acd99
commit 35cc9af4ff

View File

@ -215,6 +215,20 @@ uintptr_t RunF30F(x86emu_t *emu, uintptr_t addr)
memcpy(EX, &GX, 16); // unaligned... memcpy(EX, &GX, 16); // unaligned...
break; break;
case 0xB8: /* POPCNT Gd,Ed */
nextop = F8;
GET_ED;
GD.dword[0] = __builtin_popcount(ED->dword[0]);
RESET_FLAGS(emu);
CLEAR_FLAG(F_OF);
CLEAR_FLAG(F_SF);
CLEAR_FLAG(F_ZF);
CLEAR_FLAG(F_AF);
CLEAR_FLAG(F_CF);
CLEAR_FLAG(F_PF);
CONDITIONAL_SET_FLAG(GD.dword[0]==0, F_ZF);
break;
case 0xBC: /* TZCNT Ed,Gd */ case 0xBC: /* TZCNT Ed,Gd */
CHECK_FLAGS(emu); CHECK_FLAGS(emu);
nextop = F8; nextop = F8;