Skip to content

Commit

Permalink
[NTERPRETER] Added 64 F6 opcodes (for #1932)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Oct 13, 2024
1 parent 1e31e1f commit cce4379
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/emu/x64run64.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "x87emu_private.h"
#include "box64context.h"
#include "bridge.h"
#include "signals.h"

#include "modrm.h"

Expand Down Expand Up @@ -734,6 +735,40 @@ uintptr_t Run64(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr)
addr += tmp32s;
break;

case 0xF6: /* GRP3 Eb(,Ib) */
nextop = F8;
tmp8u = (nextop>>3)&7;
GETEB_OFFS((tmp8u<2)?1:0, tlsdata);
switch(tmp8u) {
case 0:
case 1: /* TEST Eb,Ib */
tmp8u = F8;
test8(emu, EB->byte[0], tmp8u);
break;
case 2: /* NOT Eb */
EB->byte[0] = not8(emu, EB->byte[0]);
break;
case 3: /* NEG Eb */
EB->byte[0] = neg8(emu, EB->byte[0]);
break;
case 4: /* MUL AL,Eb */
mul8(emu, EB->byte[0]);
break;
case 5: /* IMUL AL,Eb */
imul8(emu, EB->byte[0]);
break;
case 6: /* DIV Eb */
if(!EB->byte[0])
emit_div0(emu, (void*)R_RIP, 0);
div8(emu, EB->byte[0]);
break;
case 7: /* IDIV Eb */
if(!EB->byte[0])
emit_div0(emu, (void*)R_RIP, 0);
idiv8(emu, EB->byte[0]);
break;
}
break;
case 0xF7: /* GRP3 Ed(,Id) */
nextop = F8;
tmp8u = (nextop>>3)&7;
Expand Down

0 comments on commit cce4379

Please sign in to comment.