cvs commit: src/sys/sparc64/include in_cksum.h

Christoph Mallon christoph.mallon at gmx.de
Sun Jun 29 05:04:10 UTC 2008


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


More information about the cvs-src mailing list