8185723: Zero: segfaults on Power PC 32-bit
authoraph
Wed, 02 Aug 2017 17:22:40 +0100
changeset 46753 137ae24f3b52
parent 46752 a2b799e3f0be
child 46755 b9a409ea423b
8185723: Zero: segfaults on Power PC 32-bit Reviewed-by: roland
hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
--- a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp	Fri Aug 04 14:28:57 2017 +0200
+++ b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp	Wed Aug 02 17:22:40 2017 +0100
@@ -38,10 +38,10 @@
   static void atomic_copy64(const volatile void *src, volatile void *dst) {
 #if defined(PPC32)
     double tmp;
-    asm volatile ("lfd  %0, 0(%1)\n"
-                  "stfd %0, 0(%2)\n"
-                  : "=f"(tmp)
-                  : "b"(src), "b"(dst));
+    asm volatile ("lfd  %0, %2\n"
+                  "stfd %0, %1\n"
+                  : "=&f"(tmp), "=Q"(*(volatile double*)dst)
+                  : "Q"(*(volatile double*)src));
 #elif defined(S390) && !defined(_LP64)
     double tmp;
     asm volatile ("ld  %0, 0(%1)\n"