Blame SOURCES/8186461-pr3557.patch

95d809
# HG changeset patch
95d809
# User glaubitz
95d809
# Date 1524889690 -3600
95d809
#      Sat Apr 28 05:28:10 2018 +0100
95d809
# Node ID be1379a186ba527b32c93a83e04c9600735fe44b
95d809
# Parent  91ab2eac9856ec86c16c0bedd32e0b87974ead6f
95d809
8186461, PR3557: Zero's atomic_copy64() should use SPE instructions on linux-powerpcspe
95d809
Reviewed-by: aph
95d809
95d809
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
95d809
--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
95d809
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
95d809
@@ -36,12 +36,18 @@
95d809
 
95d809
   // Atomically copy 64 bits of data
95d809
   static void atomic_copy64(volatile void *src, volatile void *dst) {
95d809
-#if defined(PPC32)
95d809
+#if defined(PPC32) && !defined(__SPE__)
95d809
     double tmp;
95d809
     asm volatile ("lfd  %0, %2\n"
95d809
                   "stfd %0, %1\n"
95d809
                   : "=&f"(tmp), "=Q"(*(volatile double*)dst)
95d809
                   : "Q"(*(volatile double*)src));
95d809
+#elif defined(PPC32) && defined(__SPE__)
95d809
+    long tmp;
95d809
+    asm volatile ("evldd  %0, %2\n"
95d809
+                  "evstdd %0, %1\n"
95d809
+                  : "=&r"(tmp), "=Q"(*(volatile long*)dst)
95d809
+                  : "Q"(*(volatile long*)src));
95d809
 #elif defined(S390) && !defined(_LP64)
95d809
     double tmp;
95d809
     asm volatile ("ld  %0, 0(%1)\n"