summaryrefslogtreecommitdiff
path: root/lang/openjdk7/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_prefetch__solaris__x86.inline.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'lang/openjdk7/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_prefetch__solaris__x86.inline.hpp')
-rw-r--r--lang/openjdk7/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_prefetch__solaris__x86.inline.hpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/lang/openjdk7/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_prefetch__solaris__x86.inline.hpp b/lang/openjdk7/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_prefetch__solaris__x86.inline.hpp
new file mode 100644
index 00000000000..93c53a0e6aa
--- /dev/null
+++ b/lang/openjdk7/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_prefetch__solaris__x86.inline.hpp
@@ -0,0 +1,35 @@
+$NetBSD: patch-hotspot_src_os__cpu_solaris__x86_vm_prefetch__solaris__x86.inline.hpp,v 1.1 2013/06/15 09:31:05 jperkin Exp $
+
+GCC compatability.
+
+--- hotspot/src/os_cpu/solaris_x86/vm/prefetch_solaris_x86.inline.hpp.orig 2013-02-19 23:21:59.000000000 +0000
++++ hotspot/src/os_cpu/solaris_x86/vm/prefetch_solaris_x86.inline.hpp
+@@ -34,14 +34,28 @@ extern "C" {
+
+ inline void Prefetch::read (void *loc, intx interval) {
+ #ifdef AMD64
++#ifdef SPARC_WORKS
+ _Prefetch_read(loc, interval);
++#else
++#ifdef _GNU_SOURCE
++ __asm__ ("prefetcht0 (%0,%1,1)" : : "r" (loc), "r" (interval));
++#endif // _GNU_SOURCE
++#endif // SPARC_WORKS
+ #endif // AMD64
+ }
+
+ // Use of this method should be gated by VM_Version::has_prefetchw.
+ inline void Prefetch::write(void *loc, intx interval) {
+ #ifdef AMD64
++#ifdef SPARC_WORKS
+ _Prefetch_write(loc, interval);
++#else
++#ifdef _GNU_SOURCE
++ // Do not use the 3dnow prefetchw instruction. It isn't supported on em64t.
++ // __asm__ ("prefetchw (%0,%1,1)" : : "r" (loc), "r" (interval));
++ __asm__ ("prefetcht0 (%0,%1,1)" : : "r" (loc), "r" (interval));
++#endif // _GNU_SOURCE
++#endif // SPARC_WORKS
+ #endif // AMD64
+ }
+