java-1.8.0-openjdk/jdk8185723-pr3553-zero_segfaults_on_power_pc_32_bit.patch

28 lines
1.1 KiB
Diff
Raw Normal View History

2018-06-11 15:11:26 +00:00
# HG changeset patch
# User aph
# Date 1501690960 -3600
# Wed Aug 02 17:22:40 2017 +0100
# Node ID 91ab2eac9856ec86c16c0bedd32e0b87974ead6f
# Parent 4e2adbc3d2b512f6b2bf318d2db60f4d1903f8c7
8185723, PR3553: Zero: segfaults on Power PC 32-bit
Reviewed-by: roland
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
@@ -38,10 +38,10 @@
static void atomic_copy64(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"