From owner-freebsd-hackers Fri Sep 19 10:48:26 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA26969 for hackers-outgoing; Fri, 19 Sep 1997 10:48:26 -0700 (PDT) Received: from watermarkgroup.com (lor.watermarkgroup.com [38.246.139.30]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id KAA26964 for ; Fri, 19 Sep 1997 10:48:21 -0700 (PDT) Received: by watermarkgroup.com (4.1/SMI-4.1) id AA26610; Fri, 19 Sep 97 13:47:45 EDT Date: Fri, 19 Sep 97 13:47:45 EDT From: luoqi@watermarkgroup.com (Luoqi Chen) Message-Id: <9709191747.AA26610@watermarkgroup.com> To: kuku@gilberto.physik.RWTH-Aachen.DE, tlambert@primenet.com Subject: Re: FPE problem Cc: freebsd-hackers@freefall.FreeBSD.org Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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