This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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: [RFC] Fix full memory barrier on SPARC-V8


On Jun 27, 2011, at 19:00, David Miller <davem@davemloft.net> wrote:

> V8 can only reorder stores, that's why it only has a 'stbar'
> instruction.  I'm not so sure I agree with trying to paper over the
> fact that someone has compiled code for v8 that's going to run on a v9
> cpu.

That's not the issue. While it is true that all stores will be submitted in order , this does not guarantee store-load consistency. In particular on a multiprocessor, each individual processor has it's own store buffers and cannot see what is in the other CPUs store buffet. In the end all stores will be committed to memory in a sequential order, but that is not sufficient. The use of a load-store instruction is needed to achieve a full barrier.  The SPARC architecture manuals describe this in detail. 

  -Geert


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