[Top] [All Lists]

Re: Benchmark performance

Subject: Re: Benchmark performance
From: Atsushi Nemoto <>
Date: Thu, 16 Aug 2001 20:15:50 +0900 (JST)
In-reply-to: <005b01c12633$813c8820$0deca8c0@Ulysses>
Organization: TOSHIBA Personal Computer System Corporation
References: <> <> <005b01c12633$813c8820$0deca8c0@Ulysses>
>>>>> On Thu, 16 Aug 2001 11:11:56 +0200, "Kevin D. Kissell" <> 
>>>>> said:
>> I do not know this is really desired behavior, but here is a patch
>> to change this.  If Unimplemented exception had been occured during
>> the benchmark, aplying this patch may result better performance.

kevink> Not desired behavior, just an artifact.  However, I agree with
kevink> Carsten that changing the API to the emulator for this and
kevink> using a counter as you have done is not appropriate, and that
kevink> the existing CPU configuration flag is a more appriate mechanism.

I see.  I created that patch while debugging time an another FPU
emulator's problem (as I reported in another message) on CPU with real
FPU.  Now the 'counter' method is not needed at all.

Although another fix by Ralf is ready, here is my new patch.

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 19:41:35 2001
@@ -48,6 +48,8 @@
 #include <asm/mipsregs.h>
 #include <asm/system.h>
 #include <asm/pgtable.h>
+#include <asm/cpu.h>
+#include <asm/bootinfo.h>
 #include <asm/fpu_emulator.h>
@@ -1682,6 +1684,8 @@
                        sig = cop1Emulate(xcp, ctx);
                        xcp->cp0_epc += 4;      /* skip nops */
+               if (mips_cpu.options & MIPS_CPU_FPU)
+                       break;
        } while (xcp->cp0_epc > prevepc && sig == 0);
        /* SIGILL indicates a non-fpu instruction */
<Prev in Thread] Current Thread [Next in Thread>