java-1.8.0-openjdk/jdk8185723-pr3553-zero_segfaults_on_power_pc_32_bit.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

28 lines
1.1 KiB
Diff

# 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"