Blame SOURCES/pr3559.patch

95d809
# HG changeset patch
95d809
# User aph
95d809
# Date 1338206478 14400
95d809
#      Mon May 28 08:01:18 2012 -0400
95d809
# Node ID 6275d7b419091092752d5a1854194c98897892ba
95d809
# Parent  be1379a186ba527b32c93a83e04c9600735fe44b
95d809
PR3559: Use ldrexd for atomic reads on ARMv7.
95d809
95d809
2012-05-28  Andrew Haley  <aph@redhat.com>
95d809
95d809
	* os_linux_zero.hpp (atomic_copy64): Use ldrexd for atomic reads
95d809
	on ARMv7.
95d809
95d809
diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
95d809
--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
95d809
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
95d809
@@ -54,6 +54,12 @@
95d809
                   "std %0, 0(%2)\n"
95d809
                   : "=r"(tmp)
95d809
                   : "a"(src), "a"(dst));
95d809
+#elif defined(__ARM_ARCH_7A__)
95d809
+    jlong tmp;
95d809
+    asm volatile ("ldrexd  %0, [%1]\n"
95d809
+                  : "=r"(tmp)
95d809
+                  : "r"(src), "m"(src));
95d809
+    *(jlong *) dst = tmp;
95d809
 #else
95d809
     *(jlong *) dst = *(jlong *) src;
95d809
 #endif