projects
/
platform
/
upstream
/
openblas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73de176
)
On x86-64, make MB/WMB compiler barriers
author
Arjan van de Ven
<arjan@linux.intel.com>
Sun, 17 Jun 2018 17:53:15 +0000
(17:53 +0000)
committer
Arjan van de Ven
<arjan@linux.intel.com>
Sun, 17 Jun 2018 17:53:15 +0000
(17:53 +0000)
Whie on x86(64) one does not normally need full memory barriers, it's
good practice to at least use compiler barriers for places where on other
architectures memory barriers are used; this prevents the compiler
from over-optimizing.
common_x86_64.h
patch
|
blob
|
history
diff --git
a/common_x86_64.h
b/common_x86_64.h
index
7461aaf
..
3236778
100644
(file)
--- a/
common_x86_64.h
+++ b/
common_x86_64.h
@@
-60,8
+60,13
@@
#endif
*/
+#ifdef __GNUC__
+#define MB __asm__ __volatile__("": : :"memory")
+#define WMB __asm__ __volatile__("": : :"memory")
+#else
#define MB
#define WMB
+#endif
static void __inline blas_lock(volatile BLASULONG *address){