From owner-cvs-all@FreeBSD.ORG Sun Jun 29 05:04:10 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B8C7106567B for ; Sun, 29 Jun 2008 05:04:10 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id D42088FC18 for ; Sun, 29 Jun 2008 05:04:09 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 29 Jun 2008 05:04:07 -0000 Received: from p54A3F259.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.242.89] by mail.gmx.net (mp059) with SMTP; 29 Jun 2008 07:04:07 +0200 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1+JgdEAkhuJqVQBLtl8gYfoStr4PpZvCIiIhTFW/E bIX8bsNU9hTwt3 Message-ID: <486717C7.4050504@gmx.de> Date: Sun, 29 Jun 2008 07:04:07 +0200 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.9 (X11/20071230) MIME-Version: 1.0 To: Bruce Evans References: <200806252105.m5PL5AUp064418@repoman.freebsd.org> <48654667.1040401@gmx.de> <20080627222404.GJ1215@alchemy.franken.de> <20080628120700.S89039@delplex.bde.org> <20080628112358.GK1215@alchemy.franken.de> <20080629140037.H92490@delplex.bde.org> In-Reply-To: <20080629140037.H92490@delplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Marius Strobl Subject: Re: cvs commit: src/sys/sparc64/include in_cksum.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2008 05:04:10 -0000 Bruce Evans wrote: >> So by now you are saying that using "__volatile" in this case >> is the wrong solution and that using "cc" is a style bug. How >> am I supposed to tell the compiler that the inline assembler >> alters the condition codes then, which it apparently needs to >> know as it at shown to otherwise generate broken code even >> when using a single __asm() for the istructions. > > Using volatile is wrong in this and most cases. > > Use "cc" when it isn't a style bug :-). I guess this is on some CPUs > including sparc64 now, and in all new asms on i386. What is the rule for "cc" being a style bug? In style(9) nothing is mentioned. The only sensible rule I can think of is "if the assembler code destroys the condition codes, add "cc" to the clobber list, so GCC is informed about this and can get the data depedencies right". Regards Christoph