Skip to content

Commit ac48800

Browse files
committed
Added 64/65 F7 opcode (for #1048)
1 parent b197194 commit ac48800

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/emu/x86run64.c

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "x86trace.h"
1313
#include "box86context.h"
1414
#include "bridge.h"
15+
#include "signals.h"
1516
#ifdef DYNAREC
1617
#include "../dynarec/arm_lock_helper.h"
1718
#endif
@@ -416,6 +417,40 @@ uintptr_t Run64(x86emu_t *emu, int seg, uintptr_t addr)
416417
return addr-1; // ignore FS: to execute regular opcode
417418
break;
418419

420+
case 0xF7: /* GRP3 Ed(,Id) */
421+
nextop = F8;
422+
GET_ED_OFFS(tlsdata);
423+
switch((nextop>>3)&7) {
424+
case 0:
425+
case 1: /* TEST Ed,Id */
426+
tmp32u = F32;
427+
test32(emu, ED->dword[0], tmp32u);
428+
break;
429+
case 2: /* NOT Ed */
430+
ED->dword[0] = not32(emu, ED->dword[0]);
431+
break;
432+
case 3: /* NEG Ed */
433+
ED->dword[0] = neg32(emu, ED->dword[0]);
434+
break;
435+
case 4: /* MUL EAX,Ed */
436+
mul32_eax(emu, ED->dword[0]);
437+
break;
438+
case 5: /* IMUL EAX,Ed */
439+
imul32_eax(emu, ED->dword[0]);
440+
break;
441+
case 6: /* DIV Ed */
442+
if(!ED->dword[0])
443+
emit_div0(emu, (void*)R_EIP, 0);
444+
div32(emu, ED->dword[0]);
445+
break;
446+
case 7: /* IDIV Ed */
447+
if(!ED->dword[0])
448+
emit_div0(emu, (void*)R_EIP, 0);
449+
idiv32(emu, ED->dword[0]);
450+
break;
451+
}
452+
break;
453+
419454
case 0xFF: /* GRP 5 Ed */
420455
nextop = F8;
421456
GET_ED_OFFS(tlsdata);

0 commit comments

Comments
 (0)