From owner-freebsd-current@FreeBSD.ORG Tue May 20 11:03:42 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8A6E37B401 for ; Tue, 20 May 2003 11:03:42 -0700 (PDT) Received: from HAL9000.homeunix.com (12-233-57-131.client.attbi.com [12.233.57.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1502343F85 for ; Tue, 20 May 2003 11:03:42 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.5) with ESMTP id h4KI3fqN002474; Tue, 20 May 2003 11:03:41 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.5/Submit) id h4KI3aBe002473; Tue, 20 May 2003 11:03:36 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Tue, 20 May 2003 11:03:36 -0700 From: David Schultz To: Terry Lambert Message-ID: <20030520180336.GB2372@HAL9000.homeunix.com> Mail-Followup-To: Terry Lambert , Jon Lido , freebsd-current@freebsd.org References: <200305201025.30296.jlido@goof.com> <3ECA526F.A6E4A085@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3ECA526F.A6E4A085@mindspring.com> cc: Jon Lido cc: freebsd-current@FreeBSD.ORG Subject: Re: gcc/libm floating-point bug? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2003 18:03:43 -0000 On Tue, May 20, 2003, Terry Lambert wrote: > Jon Lido wrote: > > I've been running 5-CURRENT on my laptop for about a week now. I believe I > > may have found a bug in FreeBSD's gcc floating-point code generation, or > > perhaps more likely, in the math library. > [ ... ] > > I know my floating point hardware is fine, since I used to run xmms and artsd > > fine under Linux before I switched the machine to FreeBSD. > > > > I'd appreciate any help with further isolating and reproducing the bug. Has > > anyone else experienced this problem? > > There was a recent discussion about -mieee being set by > default in one of the Makefiles, which leaked into the > main code base. It may be that you need the option, or > you need to disable it (depending on when you downloaded > you copy of -current). That's for an Alpha-specific problem. The i386-specific problem is due to a bug gcc has that involves Pentium 4 code generation and aliasing. The latter can be fixed by removing -march=pentium4, disabling optimization, or upgrading to gcc 3.3. The former is intentional and not expected to change; gcc generates non-standard FP math code on Alpha because it saves a few instructions to deal with NaNs, etc. We work around it by setting -mieee in bsd.cpu.mk for Alpha.