Date: Fri, 19 Sep 97 13:47:45 EDT From: luoqi@watermarkgroup.com (Luoqi Chen) To: kuku@gilberto.physik.RWTH-Aachen.DE, tlambert@primenet.com Cc: freebsd-hackers@freefall.FreeBSD.org Subject: Re: FPE problem Message-ID: <9709191747.AA26610@watermarkgroup.com>
next in thread | raw e-mail | index | archive | help
> On Thu, Sep 18, 1997 at 04:18:06PM +0000, Terry Lambert wrote: > > > A little bit more info now: > > > > > > ret_val = -z__ * (spint_1.a1 * z__ * (spint_1.a2 * z__ * (spint_1.a3 * > > > z2 * (spint_1.a4 * z2 * (spint_1.a5 * z2 * (spint_1.a6 * z2 * > > > (spint_1.a7 * z2 * (spint_1.a8 * z2 * (spint_1.a9 * z2 * ( > > > spint_1.a10 * z2 + 1.) + 1.) + 1.) + 1.) + 1.) + 1.) + 1.) + > > > 1.) + 1.) + 1.) + spint_1.zeta2 + z__ * log(1. - *x); > > > > > > > > > (xxgdb) info float > > > u: status 0x82e1: exceptions: INVALID LOS FPSTACK; flags: 0010; top 0 > > > e: status 0x200: flags: 0010; top 0 > > > control 0x1272: compute to 53 bits; round NEAREST; mask: DENORM UNDERF LOS; > > > last instruction: opcode 0x1d0; pc 0x8:0xf01f9a96; operand 0x27:0x92844 > > > > [ ... ] > > > > > What is LOS ? Loss of significance? > > > [ valuable floating point insights ommitted ] > > Now it's getting funny: > > The exception only occurs on certain machines. I have a dynamically linked > binary which I compiled on an around July -current 486 machine and it does > *not* do a FPE there. > > The machines where it occurs were built with > CFLAGS= -ffast-math -m486 -O2 > > That means that libm (or libmsun) were built with inline fpu instructions > and this is causing the trouble. > > I will rebuild the math libs with conservative switches now. > I had these kind of FPE exceptions before, but couldn't quite figure out why. I suspects this may have something to do the bcopy() on 586 using the floating point stack. You could turn off the bcopy() optimization by setting npx0 flag to 0x7 in your conf file, and see if you can duplicate the problem. Maybe I will try it myself. Does anybody know if I can modify the flag using boot -c, or I have to recompile a new kernel? -lq
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9709191747.AA26610>