From 935289b5bc54faefb5b87c843f8e6c82adc98b04 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Thu, 27 Feb 2014 03:54:43 +0000 Subject: [PATCH] [FAST486] All of the FPU opcodes fetch another byte which is the function number. This is done by the CPU and it occurs even if there is no FPU attached. svn path=/branches/ntvdm/; revision=62344 --- lib/fast486/fpu.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/lib/fast486/fpu.c b/lib/fast486/fpu.c index a73e079ff75..a4a35116066 100644 --- a/lib/fast486/fpu.c +++ b/lib/fast486/fpu.c @@ -35,8 +35,17 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD8) { + UCHAR Function; + FPU_CHECK(); + /* Fetch the function number */ + if (!Fast486FetchByte(State, &Function)) + { + /* Exception occurred */ + return FALSE; + } + #ifndef FAST486_NO_FPU // TODO: NOT IMPLEMENTED UNIMPLEMENTED; @@ -50,8 +59,17 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD8) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD9) { + UCHAR Function; + FPU_CHECK(); + /* Fetch the function number */ + if (!Fast486FetchByte(State, &Function)) + { + /* Exception occurred */ + return FALSE; + } + #ifndef FAST486_NO_FPU // TODO: NOT IMPLEMENTED UNIMPLEMENTED; @@ -65,8 +83,17 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD9) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDA) { + UCHAR Function; + FPU_CHECK(); + /* Fetch the function number */ + if (!Fast486FetchByte(State, &Function)) + { + /* Exception occurred */ + return FALSE; + } + #ifndef FAST486_NO_FPU // TODO: NOT IMPLEMENTED UNIMPLEMENTED; @@ -80,8 +107,17 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDA) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDB) { + UCHAR Function; + FPU_CHECK(); + /* Fetch the function number */ + if (!Fast486FetchByte(State, &Function)) + { + /* Exception occurred */ + return FALSE; + } + #ifndef FAST486_NO_FPU // TODO: NOT IMPLEMENTED UNIMPLEMENTED; @@ -95,8 +131,17 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDB) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDC) { + UCHAR Function; + FPU_CHECK(); + /* Fetch the function number */ + if (!Fast486FetchByte(State, &Function)) + { + /* Exception occurred */ + return FALSE; + } + #ifndef FAST486_NO_FPU // TODO: NOT IMPLEMENTED UNIMPLEMENTED; @@ -110,8 +155,17 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDC) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDD) { + UCHAR Function; + FPU_CHECK(); + /* Fetch the function number */ + if (!Fast486FetchByte(State, &Function)) + { + /* Exception occurred */ + return FALSE; + } + #ifndef FAST486_NO_FPU // TODO: NOT IMPLEMENTED UNIMPLEMENTED; @@ -125,8 +179,17 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDD) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDE) { + UCHAR Function; + FPU_CHECK(); + /* Fetch the function number */ + if (!Fast486FetchByte(State, &Function)) + { + /* Exception occurred */ + return FALSE; + } + #ifndef FAST486_NO_FPU // TODO: NOT IMPLEMENTED UNIMPLEMENTED; @@ -140,8 +203,17 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDE) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDF) { + UCHAR Function; + FPU_CHECK(); + /* Fetch the function number */ + if (!Fast486FetchByte(State, &Function)) + { + /* Exception occurred */ + return FALSE; + } + #ifndef FAST486_NO_FPU // TODO: NOT IMPLEMENTED UNIMPLEMENTED;