From owner-freebsd-arm@FreeBSD.ORG Fri Jan 20 15:05:41 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C532106564A for ; Fri, 20 Jan 2012 15:05:41 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta09.emeryville.ca.mail.comcast.net (qmta09.emeryville.ca.mail.comcast.net [76.96.30.96]) by mx1.freebsd.org (Postfix) with ESMTP id 455618FC0A for ; Fri, 20 Jan 2012 15:05:41 +0000 (UTC) Received: from omta24.emeryville.ca.mail.comcast.net ([76.96.30.92]) by qmta09.emeryville.ca.mail.comcast.net with comcast id Pqk11i0031zF43QA9r5h32; Fri, 20 Jan 2012 15:05:41 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta24.emeryville.ca.mail.comcast.net with comcast id Pr5f1i01H4NgCEG8kr5guT; Fri, 20 Jan 2012 15:05:40 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q0KF5c5J008476; Fri, 20 Jan 2012 08:05:38 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: David Schultz In-Reply-To: <20120117201506.GA56160@zim.MIT.EDU> References: <20120114081214.GA14925@zim.MIT.EDU> <1326563626.1678.34.camel@revolution.hippie.lan> <20120114182933.GA17739@zim.MIT.EDU> <1326568038.1678.43.camel@revolution.hippie.lan> <20120114211039.GA18310@zim.MIT.EDU> <1326591214.1678.85.camel@revolution.hippie.lan> <20120116022647.GA36657@zim.MIT.EDU> <1326730552.1669.29.camel@revolution.hippie.lan> <20120116195113.GA87187@zim.MIT.EDU> <1326827437.1669.148.camel@revolution.hippie.lan> <20120117201506.GA56160@zim.MIT.EDU> Content-Type: text/plain Date: Fri, 20 Jan 2012 08:05:38 -0700 Message-Id: <1327071938.13801.9.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.26.0 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm Subject: Re: fenv.h fixes for softfloat X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2012 15:05:41 -0000 On Tue, 2012-01-17 at 15:15 -0500, David Schultz wrote: > If declaring the flags variable volatile is enough to get things > working, more or less, then perhaps we ought to do that until we > have a real 21st-century compiler. I've been pondering this for a couple days, and I think it's probably a good idea. The problem seems to be that the compiler and optimizer are unaware of the fact that the fenv stuff can change across certain operations, and 'volatile' tells the compiler exactly "this value can change in ways you are unaware of." I can't think of any downside other than trying to figure out/remember 5 years from now why the variable is volatile, and that can be fixed with a little comment nearby. Oh, another thing I've been meaning to mention... Doesn't the mips platform also use software floating point? If so, then I think libc/mips/gen/flt_rounds.c needs to be modified to look more like the one I did for arm, with separate software and hardware implementations. -- Ian