Date: Sat, 28 Jun 2008 14:52:41 +0200 From: Marius Strobl <marius@alchemy.franken.de> To: Christoph Mallon <christoph.mallon@gmx.de> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sparc64/include in_cksum.h Message-ID: <20080628125241.GN1215@alchemy.franken.de> In-Reply-To: <48657008.4010504@gmx.de> References: <200806272217.m5RMHTd7006079@repoman.freebsd.org> <48657008.4010504@gmx.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 28, 2008 at 12:56:08AM +0200, Christoph Mallon wrote: > Marius Strobl wrote: > >marius 2008-06-27 22:17:14 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/sparc64/include in_cksum.h > > Log: > > SVN rev 180073 on 2008-06-27 22:17:14Z by marius > > > > Improve r180011 by explicitly adding the condition codes to the > > clobber list. > > You should remove the volatile specifier. For example volatile prevents > common subexpression elimination and other types of optimisations. > I had to adjust the constraint strings in this source file twice now in order to keep GCC from generating broken code, thus I prefer to be conservative by using a slightly bigger hammer and leave the "__volatile" in in order to keep these kind of problems from coming back to haunt us over and over again. Especially when it comes to something as vaguely ("important side-effects", "access memory in an unpredictable fashion", etc) documented as the GCC assembler constraints and thus hard to get right without studying the GCC source and maybe requiring "__volatile" in the future anyway. Marius
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080628125241.GN1215>