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