From c1305f8ddac53ac3be89164083f14f17ab781952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Mon, 20 Jul 2009 17:55:52 +0000 Subject: [PATCH] check for pic irq events after emulated iret instruction for the recompiler Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3448 --- src/cpu/core_dyn_x86.cpp | 7 +++++-- src/cpu/core_dynrec.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/cpu/core_dyn_x86.cpp b/src/cpu/core_dyn_x86.cpp index dbbb72b2..b242e7b6 100644 --- a/src/cpu/core_dyn_x86.cpp +++ b/src/cpu/core_dyn_x86.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: core_dyn_x86.cpp,v 1.35 2009-05-27 09:15:41 qbix79 Exp $ */ +/* $Id: core_dyn_x86.cpp,v 1.36 2009-07-20 17:55:52 c2woody Exp $ */ #include "dosbox.h" @@ -306,7 +306,10 @@ run_block: return debugCallback; } #endif - if (!GETFLAG(TF)) goto restart_core; + if (!GETFLAG(TF)) { + if (GETFLAG(IF) && PIC_IRQCheck) return CBRET_NONE; + goto restart_core; + } cpudecoder=CPU_Core_Dyn_X86_Trap_Run; if (!dyn_dh_fpu.state_used) return CBRET_NONE; DH_FPU_SAVE_REINIT diff --git a/src/cpu/core_dynrec.cpp b/src/cpu/core_dynrec.cpp index 2819c1f9..7aa7e7ae 100644 --- a/src/cpu/core_dynrec.cpp +++ b/src/cpu/core_dynrec.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: core_dynrec.cpp,v 1.12 2009-05-27 09:15:41 qbix79 Exp $ */ +/* $Id: core_dynrec.cpp,v 1.13 2009-07-20 17:55:52 c2woody Exp $ */ #include "dosbox.h" @@ -233,7 +233,10 @@ run_block: #if C_HEAVY_DEBUG if (DEBUG_HeavyIsBreakpoint()) return debugCallback; #endif - if (!GETFLAG(TF)) break; + if (!GETFLAG(TF)) { + if (GETFLAG(IF) && PIC_IRQCheck) return CBRET_NONE; + break; + } // trapflag is set, switch to the trap-aware decoder cpudecoder=CPU_Core_Dynrec_Trap_Run; return CBRET_NONE;