From d01bdf9186f107ce73e5f9b15cab1663b00a47cb Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Mon, 12 Apr 2021 18:49:54 +0200 Subject: Added 9E/9F opcodes ([DYNAREC] too) --- src/emu/x64run.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/emu/x64run.c') diff --git a/src/emu/x64run.c b/src/emu/x64run.c index 471aa8f2..c08c1ac0 100755 --- a/src/emu/x64run.c +++ b/src/emu/x64run.c @@ -538,7 +538,19 @@ x64emurun: emu->eflags.x64 = ((Pop(emu) & 0x3F7FD7)/* & (0xffff-40)*/ ) | 0x2; // mask off res2 and res3 and on res1 RESET_FLAGS(emu); break; - + case 0x9E: /* SAHF */ + tmp8u = emu->regs[_AX].byte[1]; + CONDITIONAL_SET_FLAG(tmp8u&0x01, F_CF); + CONDITIONAL_SET_FLAG(tmp8u&0x04, F_PF); + CONDITIONAL_SET_FLAG(tmp8u&0x10, F_AF); + CONDITIONAL_SET_FLAG(tmp8u&0x40, F_ZF); + CONDITIONAL_SET_FLAG(tmp8u&0x80, F_SF); + RESET_FLAGS(emu); + break; + case 0x9F: /* LAHF */ + CHECK_FLAGS(emu); + R_AH = (uint8_t)emu->eflags.x64; + break; case 0xA0: /* MOV AL,Ob */ R_AL = *(uint8_t*)F64; break; -- cgit 1.4.1