From owner-freebsd-alpha@FreeBSD.ORG Wed May 5 21:31:39 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3133016A4CE for ; Wed, 5 May 2004 21:31:39 -0700 (PDT) Received: from VARK.homeunix.com (adsl-68-124-137-57.dsl.pltn13.pacbell.net [68.124.137.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5D5343D1D for ; Wed, 5 May 2004 21:31:38 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.10/8.12.10) with ESMTP id i464VcAd027049; Wed, 5 May 2004 21:31:38 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.10/8.12.10/Submit) id i464VcR8027046; Wed, 5 May 2004 21:31:38 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Wed, 5 May 2004 21:31:38 -0700 From: David Schultz To: Marcel Moolenaar Message-ID: <20040506043137.GA10641@VARK.homeunix.com> References: <20040428064116.GA7870@VARK.homeunix.com> <20040504133904.GA22084@VARK.homeunix.com> <20040506020629.GA23555@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040506020629.GA23555@dhcp01.pn.xcllnt.net> cc: alpha@FreeBSD.ORG Subject: Re: Problems with floating point exception flags X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2004 04:31:39 -0000 On Wed, May 05, 2004, Marcel Moolenaar wrote: > On Tue, May 04, 2004 at 06:39:04AM -0700, David Schultz wrote: > > > > Here is a better kernel patch. Instead of treating all the bits > > of the FPCR as sticky, it merely treats the exception flags that > > way. After reading the source carefully, I'm pretty sure this is > > the right fix, but I can't test it without working hardware. > > I also uncovered a bug in the way the software floating-point > > routines handle underflow. See below. > > I built and booted a kernel with these patches. Trying to exercise the > code with the files at http://people.freebsd.org/~das/alpha yield: Thanks! > alpha% ./te > Should be 00: 00 > Floating exception (core dumped) > May 5 19:00:11 alpha kernel: pid 638 (te), uid 4152: exited on signal 8 (core dumped) You need to compile the program with gcc's -mieee option in order to get floating point to work in a reasonable way on alpha. If you could try the program compiled with -mieee, that would be great.