[coreboot] [PATCH] v3: make inline asm declarations consistent

Stefan Reinauer stepan at coresystems.de
Sat Sep 6 22:34:09 CEST 2008


Carl-Daniel Hailfinger wrote:
> v3 uses all combinations of __asm__, asm, __volatile__, volatile and
> single variations to declare inline asm statements. "asm" is a GNU C
> extension, while volatile is ANSI C. That means:
> - __volatile__ can be replaced by volatile unless you use a pure K&R
> compiler.
> - asm is not a reserved keyword and should be replaced by __asm__.
> As a bonus, grepping for __asm__ returns less hits than asm because asm
> is also used as a normal word in comments.
>
>   
What are the implications of this? I think we should either go __asm__
__volatile__ or asm volatile for the sake of looking at the code without
eye cancer, but not mix it.

We're absolutely gcc specific, so discussing about asm not being
reserved sounds a bit vain. Also, is __asm__ reserved? Reserved by whom?
I know more compilers that know about asm than __asm__ if we're really
trying to become non-GNU-centric.

What's the goal of your patch?

Stefan


-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866





More information about the coreboot mailing list