Add barrier() primitive (was present in Eb5.4), used by some currently
authorMichael Brown <mcb30@etherboot.org>
Sat, 18 Aug 2007 17:04:50 +0000 (18:04 +0100)
committerMichael Brown <mcb30@etherboot.org>
Sat, 18 Aug 2007 17:05:00 +0000 (18:05 +0100)
out-of-tree driver code.

src/include/compiler.h

index b130f28..2151fc6 100644 (file)
@@ -311,6 +311,11 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr,
  */
 #define __shared __asm__ ( "_shared_bss" )
 
+/**
+ * Optimisation barrier
+ */
+#define barrier() __asm__ __volatile__ ( "" : : : "memory" )
+
 #endif /* ASSEMBLY */
 
 #endif /* COMPILER_H */