changeset 13449:2e969fa1b29c

8185723: Zero: segfaults on Power PC 32-bit Reviewed-by: roland
author aph
date Wed, 02 Aug 2017 17:22:40 +0100
parents d7719b146b88
children 2cbcc2fdc073
files src/os_cpu/linux_zero/vm/os_linux_zero.hpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp	Fri Aug 04 14:28:57 2017 +0200
+++ b/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"