java-1.8.0-openjdk/pr3559-use_ldrexd_for_atomic_reads_on_armv7_zero.patch
Jiri Vanek 195d8173c7 renamed all patches to new convention
bug1-bug2-..-bugN-XY-lowercase_comment_suffix_or_jdkpart.patch
 XY is number 01-99 for patches which are order sensitive or simply counts together
 where bugs are jdkIJK or prLMN or rhOPQ and if more bugs (which is desired) then in jdk->pr->rh order.
 I..Q are numbers corresponding to:
 https://bugs.openjdk.java.net/browse/JDK-IJK
 https://icedtea.classpath.org/bugzilla/show_bug.cgi?id=LMN
 https://bugzilla.redhat.com/show_bug.cgi?id=OPQ
2018-11-20 10:58:25 +01:00

30 lines
1000 B
Diff

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