From 9715794e08f062bd7da256263db4b2dd54ef89f4 Mon Sep 17 00:00:00 2001 From: TomW Date: Sun, 9 Aug 2015 13:06:01 +0100 Subject: [PATCH] Recompiler now handles divide exceptions correctly - now runs Flight Simulator 5.1 with QEMM --- src/x86_ops_misc.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/x86_ops_misc.h b/src/x86_ops_misc.h index d255b44..a7f3f70 100644 --- a/src/x86_ops_misc.h +++ b/src/x86_ops_misc.h @@ -95,6 +95,7 @@ static int opF6_a16(uint32_t fetchdat) else { x86_int(0); + return 1; } CLOCK_CYCLES(is486 ? 16 : 14); break; @@ -116,6 +117,7 @@ static int opF6_a16(uint32_t fetchdat) { // pclog("IDIVb exception - %X / %08X = %X\n", tempws, dst, tempws2); x86_int(0); + return 1; } CLOCK_CYCLES(19); break; @@ -183,6 +185,7 @@ static int opF6_a32(uint32_t fetchdat) else { x86_int(0); + return 1; } CLOCK_CYCLES(is486 ? 16 : 14); break; @@ -204,6 +207,7 @@ static int opF6_a32(uint32_t fetchdat) { // pclog("IDIVb exception - %X / %08X = %X\n", tempws, dst, tempws2); x86_int(0); + return 1; } CLOCK_CYCLES(19); break; @@ -274,6 +278,7 @@ static int opF7_w_a16(uint32_t fetchdat) { // fatal("DIVw BY 0 %04X:%04X %i\n",cs>>4,pc,ins); x86_int(0); + return 1; } CLOCK_CYCLES(is486 ? 24 : 22); break; @@ -291,6 +296,7 @@ static int opF7_w_a16(uint32_t fetchdat) { // pclog("IDIVw exception - %X / %08X = %X\n",tempws, dst, tempws2); x86_int(0); + return 1; } CLOCK_CYCLES(27); break; @@ -358,6 +364,7 @@ static int opF7_w_a32(uint32_t fetchdat) { // fatal("DIVw BY 0 %04X:%04X %i\n",cs>>4,pc,ins); x86_int(0); + return 1; } CLOCK_CYCLES(is486 ? 24 : 22); break; @@ -375,6 +382,7 @@ static int opF7_w_a32(uint32_t fetchdat) { // pclog("IDIVw exception - %X / %08X = %X\n", tempws, dst, tempws2); x86_int(0); + return 1; } CLOCK_CYCLES(27); break;