This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]