summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-09 20:40:56 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-09 20:40:56 +0000
commit20db34bb0fe9ef2a39dffc08d0b7c62a7873e048 (patch)
tree6fd9de8c6d16c00cb6faaa80e80f6cf3b2af51fa
parent38ac16ec87cf5900fa74f102289589156a217660 (diff)
downloadgcc-20db34bb0fe9ef2a39dffc08d0b7c62a7873e048.tar.gz
* sysdep/alpha/locks.h (read_barrier): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121774 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libjava/ChangeLog4
-rw-r--r--libjava/sysdep/alpha/locks.h8
2 files changed, 12 insertions, 0 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 7f38c88ada7..49b0567e673 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,7 @@
+2007-02-09 Richard Henderson <rth@redhat.com>
+
+ * sysdep/alpha/locks.h (read_barrier): New.
+
2007-02-09 Keith Seitz <keiths@redhat.com>
* gnu/classpath/jdwp/VMVirtualMachine.java
diff --git a/libjava/sysdep/alpha/locks.h b/libjava/sysdep/alpha/locks.h
index c5f7f4993e6..a6b4394080b 100644
--- a/libjava/sysdep/alpha/locks.h
+++ b/libjava/sysdep/alpha/locks.h
@@ -50,6 +50,14 @@ compare_and_swap_release(volatile obj_addr_t *addr,
return compare_and_swap(addr, old, new_val);
}
+// Ensure that subsequent instructions do not execute on stale
+// data that was loaded from memory before the barrier.
+inline static void
+read_barrier()
+{
+ __asm__ __volatile__("mb" : : : "memory");
+}
+
// Ensure that prior stores to memory are completed with respect to other
// processors.
inline static void