From d5b286c050833acec49dba33ad6b92b4196f1b45 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Mon, 7 Jun 2021 10:08:06 +0200 Subject: Added 66 F0 81 opcodes --- src/emu/modrm.h | 1 + src/emu/x64run66f0.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/emu/modrm.h b/src/emu/modrm.h index 7f5c77ce..75df27e7 100644 --- a/src/emu/modrm.h +++ b/src/emu/modrm.h @@ -1,6 +1,7 @@ #define F8 *(uint8_t*)(R_RIP++) #define F8S *(int8_t*)(R_RIP++) #define F16 *(uint16_t*)(R_RIP+=2, R_RIP-2) +#define F16S *(int16_t*)(R_RIP+=2, R_RIP-2) #define F32 *(uint32_t*)(R_RIP+=4, R_RIP-4) #define F32S *(int32_t*)(R_RIP+=4, R_RIP-4) #define F32S64 (uint64_t)(int64_t)F32S diff --git a/src/emu/x64run66f0.c b/src/emu/x64run66f0.c index 50f159f8..305b450b 100644 --- a/src/emu/x64run66f0.c +++ b/src/emu/x64run66f0.c @@ -42,10 +42,11 @@ int Run66F0(x64emu_t *emu, rex_t rex) switch(opcode) { - case 0x83: /* GRP Ed,Ib */ + case 0x81: /* GRP Ew,Iw */ + case 0x83: /* GRP Ew,Ib */ nextop = F8; - GETED(1); - tmp64s = F8S; + GETED((opcode==0x83)?1:2); + tmp64s = (opcode==0x83)?(F8S):(F16S); tmp64u = (uint64_t)tmp64s; #ifdef DYNAREC if(rex.w) { -- cgit 1.4.1