Re: arm-elf-gcc : change default data alignement depending on ARM/THUMB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 21, 2003 at 10:57:31AM -0500, Bill Gatliff wrote:
> I don't see why Linus (or anyone else, for that matter) would have a 
> problem understanding how "volatile" works.

I have a vague feeling that there used to be border cases
for which gcc happened to produced bad code. Either way, a
quick search brought me to this post which explains it quite
clearly (I think):

http://www.geocrawler.com/archives/3/597/2001/7/0/6253709/

Essentially, his appraoach allows to control where writing
back to memory is relevant and where it isn't, while
volatile forces it all the time.

It occurs to me that the comment is mostly targeted at
shared memory structures (shared between several processors,
that is), and probably much less relevant to actual hardware
accesses.
 
> The behavior of Linus's barrier() is implied by the "volatile" keyword.  
> One less line of code to deal with, which doesn't sound like a big deal 
> until you're an ADHD trying to maintain mutliple, 400K+ line code sets 
> yourself.  :^)

Well, Linus has an infinite number of monkeys checking code :)

> Oh, and Linus's approach ties you inextricably to gcc.  Mine works for 
> any ANSI-compliant compiler.

Yes. Linux is really only target at GCC. Oh, and this is the
x-gcc mailing list! :)

/Y
 
-- 
This signature left empty.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux