From fe77e30d777fa79183c9f9a344f45ab40b455c0b Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Fri, 4 Apr 2003 21:05:54 +0000 Subject: [PATCH] Fix LAHF and SAHF Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@867 --- src/cpu/core_full/optable.h | 4 ++-- src/cpu/core_full/save.h | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/cpu/core_full/optable.h b/src/cpu/core_full/optable.h index 6bd42016..01f72660 100644 --- a/src/cpu/core_full/optable.h +++ b/src/cpu/core_full/optable.h @@ -111,7 +111,7 @@ static OpCode OpCodeTable[1024]={ {D_CBW ,0 ,0 ,0 },{D_CWD ,0 ,0 ,0 }, {L_Ifw ,O_CALL_F ,S_CSIP ,0 },{L_ERROR ,0 ,0 ,0 }, {L_FLG ,0 ,S_PUSHw,0 },{L_POPw ,0 ,S_FLGw ,0 }, -{L_FLG ,0 ,S_REGb ,REGI_AH},{L_REGb ,0 ,S_FLGb ,REGI_AH}, +{L_REGb ,0 ,S_FLGb ,REGI_AH},{L_FLG ,0 ,S_REGb ,REGI_AH}, /* 0xa0 - 0xa7 */ {L_OP ,O_ALOP ,0 ,0 },{L_OP ,O_AXOP ,0 ,0 }, @@ -469,7 +469,7 @@ static OpCode OpCodeTable[1024]={ {D_CBW ,0 ,0 ,0 },{D_CDQ ,0 ,0 ,0 }, {L_Ifd ,O_CALL_F ,S_CSIP ,0 },{L_ERROR ,0 ,0 ,0 }, {L_FLG ,0 ,S_PUSHd,0 },{L_POPd ,0 ,S_FLGd ,0 }, -{L_FLG ,0 ,S_REGb ,REGI_AH},{L_REGb ,0 ,S_FLGb ,REGI_AH}, +{L_REGb ,0 ,S_FLGb ,REGI_AH},{L_FLG ,0 ,S_REGb ,REGI_AH}, /* 0x2a0 - 0x2a7 */ {L_OP ,O_ALOP ,0 ,0 },{L_OP ,O_EAXOP ,0 ,0 }, diff --git a/src/cpu/core_full/save.h b/src/cpu/core_full/save.h index e1747df5..c8322502 100644 --- a/src/cpu/core_full/save.h +++ b/src/cpu/core_full/save.h @@ -91,9 +91,10 @@ switch (inst.code.save) { LoadIP(); break; case S_FLGb: - flags.type=t_UNKNOWN; \ - flags.cf =(inst.op1.d & 0x001)>0;flags.pf =(inst.op1.d & 0x004)>0; \ - flags.af =(inst.op1.d & 0x010)>0;flags.zf =(inst.op1.d & 0x040)>0; \ + flags.of =get_OF(); + flags.type=t_UNKNOWN; + flags.cf =(inst.op1.d & 0x001)>0;flags.pf =(inst.op1.d & 0x004)>0; + flags.af =(inst.op1.d & 0x010)>0;flags.zf =(inst.op1.d & 0x040)>0; flags.sf =(inst.op1.d & 0x080)>0; break; case S_FLGw: