linux-mips
[Top] [All Lists]

Re: floating point on Nevada cpu

To: carlson@sibyte.com
Subject: Re: floating point on Nevada cpu
From: Pete Popov <ppopov@mvista.com>
Date: Wed, 24 Jan 2001 18:52:16 -0800
Cc: "linux-mips@oss.sgi.com" <linux-mips@oss.sgi.com>
Organization: Monta Vista Software
References: <3A6F8F66.6258801@mvista.com> <0101241833281Q.00834@plugh.sibyte.com>
Sender: owner-linux-mips@oss.sgi.com
Justin Carlson wrote:
> 
> On Wed, 24 Jan 2001, Pete Popov wrote:
> > This simple test fails on a Nevada (5231) cpu:
> >
> > int main()
> > {
> >     float x1,x2,x3;
> >
> >     x1 = 7.5;
> >     x2 = 2.0;
> >     x3 = x1/x2;
> >     printf("x3 = %f\n", x3);
> > }
> >
> 
> Ummm...care to tell *how* it fails?

Here it is:

sh-2.03# ./fl
x3 = 0.000000


I'm running a test9 based kernel, but the same kernel compiled for my
Indigo2 produces the right result.  Also, the uptime commands complains
with:


Unknown HZ value! (2147483647) Assume 100.


At the console, I get "Setting flush to zero for uptime."  So, I took a
look at arch/mips/kernel/traps.c and the kernel retries the instruction
with denormalized instructions flushed to zero. However, the 5200
signals an unimplemented operation even if the FS bit is set. 

In any case, the first simple test doesn't run into the "flush to zero"
problem but the result is still bad.

Pete

<Prev in Thread] Current Thread [Next in Thread>