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]

Re: PowerPC and Volatile


On Fri, Dec 01, 2000 at 03:36:56PM -0500, Roger Racine wrote:
> Naturally, the locations we are talking about are declared volatile, so the 
> compiler does not optimize the code, but the PowerPC has its own 
> optimization in the form of pipelining, and it seems to be causing this 
> problem.
> 
> The question is, should the compiler be inserting an "eieio" instruction at 
> the sequence points in the code, such as the end of the loop mentioned 
> above?  This PPC instruction tells the processor to hold off its 
> pipelining.  We have been inserting them in the code ourselves, but it is a 
> bit of a pain to have to do it.

If this memory is in some IO space, it might be easier to set up the MMU so
that this address range is set to noncached/serialzed mode[1], ie.
read/write accesses are not re-ordered by the bus logic.

cu
Michael

[1] Not sure about the exact term on the PPC, this is from the 68040 manual,
but the PPC has the same under a different name.
-- 
Michael Schwingen, Ahornstrasse 36, 52074 Aachen

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


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