Date: Fri, 20 Jan 2012 08:05:38 -0700 From: Ian Lepore <freebsd@damnhippie.dyndns.org> To: David Schultz <das@freebsd.org> Cc: freebsd-arm <freebsd-arm@freebsd.org> Subject: Re: fenv.h fixes for softfloat Message-ID: <1327071938.13801.9.camel@revolution.hippie.lan> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1327071938.13801.9.camel>