summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2012-10-09 14:32:30 +0000
committerattilio <attilio@FreeBSD.org>2012-10-09 14:32:30 +0000
commit6997194551ffae05d71ea650af49c4551d753a1a (patch)
tree18e9f31a3018a88b46e78d76a45d0953dea5276b /sys/pc98
parent6a02d06d1d81ffda0499310925ef854fd237f382 (diff)
downloadFreeBSD-src-6997194551ffae05d71ea650af49c4551d753a1a.zip
FreeBSD-src-6997194551ffae05d71ea650af49c4551d753a1a.tar.gz
Add an unified macro to deny ability from the compiler to reorder
instruction loads/stores at its will. The macro __compiler_membar() is currently supported for both gcc and clang, but kernel compilation will fail otherwise. Reviewed by: bde, kib Discussed with: dim, theraven MFC after: 2 weeks
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/include/bus.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/pc98/include/bus.h b/sys/pc98/include/bus.h
index 69e80f0..46d1a1b 100644
--- a/sys/pc98/include/bus.h
+++ b/sys/pc98/include/bus.h
@@ -593,7 +593,7 @@ bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh,
if (flags & BUS_SPACE_BARRIER_READ)
__asm __volatile("lock; addl $0,0(%%esp)" : : : "memory");
else
- __asm __volatile("" : : : "memory");
+ __compiler_membar();
}
#ifdef BUS_SPACE_NO_LEGACY
OpenPOWER on IntegriCloud