Re: FP emulator patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> On Wed, 15 Aug 2001 14:53:12 +0200, Carsten Langgaard <carstenl@mips.com> said:
carstenl> There has been some reports regarding FP emulator failures,
carstenl> which the attached patch should solve.  The patch include a
carstenl> fix for emulation of instructions in a COP1 delay-slot, a
carstenl> fix for FP context switching and some additional stuff ,
carstenl> which was needed to pass our torture test.

There is another bug in FPU emulator.  An instruction in delay slot of
bc1tl/bc1fl executed(or emulated) even if the branch not taken.  Here
is a patch to fix this.

Since current kernel calls FPU emulator on FP exception and FPU
emulator handles continuous FP instructions in one call, this bug
affects CPUs with FPU (not only CPUs without FPU).

---
Atsushi Nemoto

diff -ur linux.sgi/arch/mips/math-emu/cp1emu.c linux/arch/mips/math-emu/cp1emu.c
--- linux.sgi/arch/mips/math-emu/cp1emu.c	Sun Aug  5 23:39:27 2001
+++ linux/arch/mips/math-emu/cp1emu.c	Thu Aug 16 12:21:07 2001
@@ -686,7 +686,7 @@
 					 * branch likely nullifies dslot if not
 					 * taken
 					 */
-					xcp->cp0_epc += 4;
+					contpc += 4;
 					/* else continue & execute dslot as normal insn */
 			}
 			break;

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux