[RFC] Fix full memory barrier on SPARC-V8

Eric Botcazou ebotcazou@adacore.com
Tue Jun 28 22:32:00 GMT 2011


> Fair enough, you can add this code if you want.

Thanks.  Note that this is marginal for Solaris as GCC defaults to -mcpu=v9 on 
Solaris but, in all other cases, it defaults to -mcpu=v8.  I can reproduce the 
problem on the SPARC/Linux machine 'grobluk' of the CompileFarm:

cpu             : TI UltraSparc II  (BlackBird)
fpu             : UltraSparc II integrated FPU
prom            : OBP 3.2.30 2002/10/25 14:03
type            : sun4u
ncpus probed    : 4
ncpus active    : 4

Linux grobluk 2.6.26-2-sparc64-smp #1 SMP Thu Nov 5 03:34:29 UTC 2009 sparc64 
GNU/Linux

With the pristine compiler, the test passes with -mcpu=v9 but fails otherwise.
It passes with the patched compiler.  However, I suspect that we would still 
have problems with newer UltraSparc CPUs supporting full RMO, because the new 
insn membar_v8 is only half a memory barrier for V9.

-- 
Eric Botcazou



More information about the Gcc-patches mailing list