SPARC NCG: Don't need a write barrier for store synchronisation on SPARC under TSO.
authorBen.Lippmeier@anu.edu.au <unknown>
Fri, 23 Jan 2009 00:50:51 +0000 (00:50 +0000)
committerBen.Lippmeier@anu.edu.au <unknown>
Fri, 23 Jan 2009 00:50:51 +0000 (00:50 +0000)
compiler/nativeGen/MachCodeGen.hs

index 1cfc7a3..002adf9 100644 (file)
@@ -3616,6 +3616,16 @@ genCCall
 
 -}
 
+
+-- On SPARC under TSO (Total Store Ordering), writes earlier in the instruction stream
+-- are guaranteed to take place before writes afterwards (unlike on PowerPC). 
+-- Ref: Section 8.4 of the SPARC V9 Architecture manual.
+--
+-- In the SPARC case we don't need a barrier.
+--
+genCCall (CmmPrim (MO_WriteBarrier)) _ _
+ = do  return nilOL
+
 genCCall target dest_regs argsAndHints 
  = do          
        -- strip hints from the arg regs