From 1471f0d319c5a026bc0f2f36490edc67ed078cbd Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Tue, 27 May 2003 20:12:34 +0000 Subject: [PATCH] finished esc 3: group 4 Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1023 --- src/fpu/fpu.cpp | 16 ++++++++++++++-- src/fpu/fpu_instructions.h | 7 +++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/fpu/fpu.cpp b/src/fpu/fpu.cpp index fc8b7901..70f4b66b 100644 --- a/src/fpu/fpu.cpp +++ b/src/fpu/fpu.cpp @@ -97,11 +97,23 @@ void FPU_ESC3_Normal(Bitu rm) { switch (group) { case 0x04: switch (sub) { - case 0x03: //FINIT + case 0x00: //FNENI + case 0x01: //FNDIS + LOG(LOG_FPU,LOG_ERROR)("8087 only fpu code used esc 3: group 4: subfuntion :%d",sub); + break; + case 0x02: //FNCLEX FCLEX + FPU_FCLEX(); + break; + case 0x03: //FNINIT FINIT FPU_FINIT(); break; + case 0x04: //FNSETPM + case 0x05: //FRSTPM + LOG(LOG_FPU,LOG_ERROR)("80267 protected mode (un)set. Nothing done"); + FPU_FNOP(); + break; default: - LOG(LOG_FPU,LOG_WARN)("ESC 3:Unhandled group %d subfunction %d",group,sub); + E_Exit("ESC 3:ILLEGAL OPCODE group %d subfunction %d",group,sub); } break; default: diff --git a/src/fpu/fpu_instructions.h b/src/fpu/fpu_instructions.h index 3b133566..e93ef964 100644 --- a/src/fpu/fpu_instructions.h +++ b/src/fpu/fpu_instructions.h @@ -28,4 +28,11 @@ static void FPU_FINIT(void) { fpu.tags[5]=TAG_Empty; fpu.tags[6]=TAG_Empty; fpu.tags[7]=TAG_Empty; +} +static void FPU_FCLEX(void){ + fpu.sw&=0x7f00; //should clear exceptions +}; + +static void FPU_FNOP(void){ + return; } \ No newline at end of file