void-packages/srcpkgs/openjdk9-bootstrap/patches/zero-ppc32.patch

21 lines
775 B
Diff

This allows zero to build on ppc32 in release mode.
Upstream in jdk8/10/etc, but it never made it into 9.
--- a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
+++ b/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"